|
|
Created:
4 years, 10 months ago by Igor Sheludko Modified:
4 years, 10 months ago Reviewers:
Toon Verwaest CC:
v8-reviews_googlegroups.com, v8-mips-ports_googlegroups.com, v8-x87-ports_googlegroups.com, v8-ppc-ports_googlegroups.com, Michael Hablich Base URL:
https://chromium.googlesource.com/v8/v8.git@master Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
Description[api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor.
Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate.
When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map.
ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to.
The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object.
BUG=chromium:579009
LOG=Y
Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d
Cr-Commit-Position: refs/heads/master@{#33674}
Committed: https://crrev.com/da213b6e37d5509637490d5a54a1950fab795734
Cr-Commit-Position: refs/heads/master@{#33798}
Patch Set 1 : #
Total comments: 10
Patch Set 2 : Addressing comments #
Total comments: 1
Patch Set 3 : Addressing comments #Patch Set 4 : Fixing browser tests for relanding #Patch Set 5 : Removed asserts preventing JSReceiver properties in ObjectTemplate #
Created: 4 years, 10 months ago
Messages
Total messages: 55 (31 generated)
The CQ bit was checked by ishell@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1642223003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1642223003/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_android_arm_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_android_arm_compile_rel/...) v8_linux_arm_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm_rel/builds/13035)
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. BUG=chromium:579009 LOG=Y ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor function template. The accessors from the instance templates of the function template were accumulated and installed when the function template Which means that We used to store all the accessors in the constructor's initial map BUG=chromium:579009 LOG=Y ==========
Patchset #1 (id:1) has been deleted
The CQ bit was checked by ishell@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1642223003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1642223003/20001
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor function template. The accessors from the instance templates of the function template were accumulated and installed when the function template Which means that We used to store all the accessors in the constructor's initial map BUG=chromium:579009 LOG=Y ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to avoid performance regression we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a shallow copying of the boilerplate object. We can use shallow copying procedure since there must only primitive data properties ObjectTemplate or accessors. BUG=chromium:579009 LOG=Y ==========
ishell@chromium.org changed reviewers: + verwaest@chromium.org
PTAL
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/1642223003/diff/20001/src/api-natives.cc File src/api-natives.cc (right): https://codereview.chromium.org/1642223003/diff/20001/src/api-natives.cc#newc... src/api-natives.cc:274: void UnacheTemplateInstantiation(Isolate* isolate, Handle<Smi> serial_number) { Unache? :) https://codereview.chromium.org/1642223003/diff/20001/src/api-natives.cc#newc... src/api-natives.cc:304: result = JSObject::DeepCopy(result, JSObject::kObjectIsShallow) Object templates can contain object templates as data properties, so the object isn't necessarily shallow right? See DefineDataProperty. https://codereview.chromium.org/1642223003/diff/20001/src/api-natives.cc#newc... src/api-natives.cc:305: .ToHandleChecked(); Note that this only works because all AccessorPairs on Object templates contain cached FunctionTemplates... ;) https://codereview.chromium.org/1642223003/diff/20001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1642223003/diff/20001/src/api.cc#newcode1294 src/api.cc:1294: // EnsureConstructor(isolate, object_template); You can now get rid of this function I presume, given that the function above is the same. https://codereview.chromium.org/1642223003/diff/20001/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1642223003/diff/20001/src/builtins.cc#newcode... src/builtins.cc:3532: if (is_construct) { DCHECK(args.receiver()->IsUndefined()) I presume?
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to avoid performance regression we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a shallow copying of the boilerplate object. We can use shallow copying procedure since there must only primitive data properties ObjectTemplate or accessors. BUG=chromium:579009 LOG=Y ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. BUG=chromium:579009 LOG=Y ==========
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. BUG=chromium:579009 LOG=Y ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. This CL also prohibits setting of non-primitive properties to ObjectTemplate to avoid potential cross-context leaks. BUG=chromium:579009 LOG=Y ==========
The CQ bit was checked by ishell@chromium.org to run a CQ dry run
The CQ bit was unchecked by ishell@chromium.org
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1642223003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1642223003/40001
The CQ bit was checked by ishell@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1642223003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1642223003/60001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #2 (id:40001) has been deleted
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. This CL also prohibits setting of non-primitive properties to ObjectTemplate to avoid potential cross-context leaks. BUG=chromium:579009 LOG=Y ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. This CL also prohibits non-primitive properties in ObjectTemplate to avoid potential cross-context leaks. BUG=chromium:579009 LOG=Y ==========
Addressed comments, PTAL again. https://codereview.chromium.org/1642223003/diff/20001/src/api-natives.cc File src/api-natives.cc (right): https://codereview.chromium.org/1642223003/diff/20001/src/api-natives.cc#newc... src/api-natives.cc:274: void UnacheTemplateInstantiation(Isolate* isolate, Handle<Smi> serial_number) { On 2016/01/29 14:37:45, Toon Verwaest wrote: > Unache? :) Done. https://codereview.chromium.org/1642223003/diff/20001/src/api-natives.cc#newc... src/api-natives.cc:304: result = JSObject::DeepCopy(result, JSObject::kObjectIsShallow) On 2016/01/29 14:37:45, Toon Verwaest wrote: > Object templates can contain object templates as data properties, so the object > isn't necessarily shallow right? See DefineDataProperty. Done. Thanks for noticing! https://codereview.chromium.org/1642223003/diff/20001/src/api-natives.cc#newc... src/api-natives.cc:305: .ToHandleChecked(); On 2016/01/29 14:37:45, Toon Verwaest wrote: > Note that this only works because all AccessorPairs on Object templates contain > cached FunctionTemplates... ;) It could actually fail here if the stack is almost over. https://codereview.chromium.org/1642223003/diff/20001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1642223003/diff/20001/src/api.cc#newcode1294 src/api.cc:1294: // EnsureConstructor(isolate, object_template); On 2016/01/29 14:37:45, Toon Verwaest wrote: > You can now get rid of this function I presume, given that the function above is > the same. Done. https://codereview.chromium.org/1642223003/diff/20001/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1642223003/diff/20001/src/builtins.cc#newcode... src/builtins.cc:3532: if (is_construct) { On 2016/01/29 14:37:45, Toon Verwaest wrote: > DCHECK(args.receiver()->IsUndefined()) I presume? Done.
I'd prefer to change do_not_cache to cache. Too much double negatives otherwise. Otherwise, LGTM. https://codereview.chromium.org/1642223003/diff/60001/src/api-natives.cc File src/api-natives.cc (right): https://codereview.chromium.org/1642223003/diff/60001/src/api-natives.cc#newc... src/api-natives.cc:210: // Install accumulated static accessors. remove "static"
The CQ bit was checked by ishell@chromium.org to run a CQ dry run
The CQ bit was unchecked by ishell@chromium.org
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1642223003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1642223003/80001
The CQ bit was checked by ishell@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from verwaest@chromium.org Link to the patchset: https://codereview.chromium.org/1642223003/#ps80001 (title: "Addressing comments")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1642223003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1642223003/80001
Message was sent while issue was closed.
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. This CL also prohibits non-primitive properties in ObjectTemplate to avoid potential cross-context leaks. BUG=chromium:579009 LOG=Y ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. This CL also prohibits non-primitive properties in ObjectTemplate to avoid potential cross-context leaks. BUG=chromium:579009 LOG=Y ==========
Message was sent while issue was closed.
Committed patchset #3 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. This CL also prohibits non-primitive properties in ObjectTemplate to avoid potential cross-context leaks. BUG=chromium:579009 LOG=Y ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. This CL also prohibits non-primitive properties in ObjectTemplate to avoid potential cross-context leaks. BUG=chromium:579009 LOG=Y Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674}
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:80001) has been created in https://codereview.chromium.org/1660263003/ by hablich@chromium.org. The reason for reverting is: Fails a lot of layout tests and blocks the roll. Can be easily reproduced with a local Chromium checkout. Reference: https://codereview.chromium.org/1652413003/.
Message was sent while issue was closed.
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. This CL also prohibits non-primitive properties in ObjectTemplate to avoid potential cross-context leaks. BUG=chromium:579009 LOG=Y Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674} ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. This CL also prohibits non-primitive properties in ObjectTemplate to avoid potential cross-context leaks. BUG=chromium:579009 LOG=Y Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674} ==========
The CQ bit was checked by ishell@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1642223003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1642223003/100001
The CQ bit was unchecked by ishell@chromium.org
The CQ bit was checked by ishell@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1642223003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1642223003/120001
PTAL relanding attempt: patch sets 4 and 5
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. This CL also prohibits non-primitive properties in ObjectTemplate to avoid potential cross-context leaks. BUG=chromium:579009 LOG=Y Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674} ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. BUG=chromium:579009 LOG=Y Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674} ==========
lgtm
The CQ bit was checked by ishell@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1642223003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1642223003/120001
Message was sent while issue was closed.
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. BUG=chromium:579009 LOG=Y Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674} ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. BUG=chromium:579009 LOG=Y Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674} ==========
Message was sent while issue was closed.
Committed patchset #5 (id:120001)
Message was sent while issue was closed.
Description was changed from ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. BUG=chromium:579009 LOG=Y Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674} ========== to ========== [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a constructor. Previously ObjectTemplate::New() logic relied on the fact that all the accessor properties are already installed in the initial map of the function object of the constructor FunctionTemplate. When the FunctionTemplate were instantiated the accessors of the instance templates from the whole inheritance chain were accumulated and added to the initial map. ObjectTemplate::SetSetAccessor() used to explicitly ensure that the ObjectTemplate has a constructor and therefore an initial map to add all accessors to. The new approach is to add all the accessors and data properties to the object exactly when the ObjectTemplate is instantiated. In order to keep it fast we now cache the object boilerplates in the Isolate::template_instantiations_cache (the former function_cache), so the object creation turns to be a deep copying of the boilerplate object. BUG=chromium:579009 LOG=Y Committed: https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674} Committed: https://crrev.com/da213b6e37d5509637490d5a54a1950fab795734 Cr-Commit-Position: refs/heads/master@{#33798} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/da213b6e37d5509637490d5a54a1950fab795734 Cr-Commit-Position: refs/heads/master@{#33798} |