Prechádzať zdrojové kódy

Merge branch 'main' of ssh://gitlab.com/freepascal.org/fpc/pas2js into main

mattias 3 rokov pred
rodič
commit
b017682e82
3 zmenil súbory, kde vykonal 5 pridanie a 3 odobranie
  1. 1 1
      compiler
  2. 2 0
      packages/rtl/classes.pas
  3. 2 2
      packages/rtl/js.pas

+ 1 - 1
compiler

@@ -1 +1 @@
-Subproject commit db39d1a4e4af8d543db22dbf85abc1c0e4dc522e
+Subproject commit cbc8aa63c83df4e16635b26e479c508229428e07

+ 2 - 0
packages/rtl/classes.pas

@@ -5199,6 +5199,8 @@ procedure TComponent.InsertComponent(AComponent: TComponent);
 
 begin
   AComponent.ValidateContainer(Self);
+  if AComponent.FOwner <> nil then
+    AComponent.FOwner.RemoveComponent(AComponent);
   ValidateRename(AComponent,'',AComponent.FName);
   Insert(AComponent);
   If csDesigning in FComponentState then

+ 2 - 2
packages/rtl/js.pas

@@ -880,8 +880,8 @@ type
     FFatal : Boolean; external name 'fatal';
     FIgnoreBOM : Boolean; external name 'ignoreBOM';
   Public
-    Constructor New(utfLabel : String);
-    Constructor New(utfLabel : String; Options : TJSTextDecoderOptions);
+    Constructor New(utfLabel : String); overload;
+    Constructor New(utfLabel : String; Options : TJSTextDecoderOptions); overload;
     Function decode(arr : TJSTypedArray) : String; overload;
     Function decode(arr : TJSArrayBuffer) : String; overload;
     Function decode(arr : TJSTypedArray; opts : TJSTextDecodeOptions) : String; overload;