Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Issue 1642223003: [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a … (Closed)

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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+618 lines, -314 lines) Patch
M src/api.cc View 1 7 chunks +27 lines, -30 lines 0 comments Download
M src/api-natives.h View 1 chunk +0 lines, -4 lines 0 comments Download
M src/api-natives.cc View 1 2 3 4 8 chunks +104 lines, -111 lines 0 comments Download
M src/arm/builtins-arm.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/arm64/builtins-arm64.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/bootstrapper.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/builtins.cc View 1 3 chunks +20 lines, -9 lines 0 comments Download
M src/contexts.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/conversions.h View 1 chunk +1 line, -1 line 0 comments Download
M src/conversions-inl.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/mips/builtins-mips.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/mips64/builtins-mips64.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 2 3 4 chunks +9 lines, -6 lines 0 comments Download
M src/objects.cc View 1 2 3 5 chunks +51 lines, -8 lines 0 comments Download
M src/objects-inl.h View 1 chunk +1 line, -1 line 0 comments Download
M src/objects-printer.cc View 17 chunks +39 lines, -38 lines 0 comments Download
M src/ppc/builtins-ppc.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/builtins-x64.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/x87/builtins-x87.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-api.cc View 1 2 3 9 chunks +349 lines, -95 lines 0 comments Download

Messages

Total messages: 55 (31 generated)
commit-bot: I haz the power
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
4 years, 10 months ago (2016-01-29 12:25:46 UTC) #2
commit-bot: I haz the power
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/builds/12707) v8_linux_arm_rel on ...
4 years, 10 months ago (2016-01-29 12:27:01 UTC) #4
commit-bot: I haz the power
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
4 years, 10 months ago (2016-01-29 12:44:08 UTC) #8
Igor Sheludko
PTAL
4 years, 10 months ago (2016-01-29 13:02:13 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-01-29 13:10:31 UTC) #13
Toon Verwaest
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#newcode274 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#newcode304 ...
4 years, 10 months ago (2016-01-29 14:37:45 UTC) #14
commit-bot: I haz the power
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
4 years, 10 months ago (2016-02-01 16:49:21 UTC) #19
commit-bot: I haz the power
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
4 years, 10 months ago (2016-02-01 17:28:57 UTC) #21
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-01 18:07:09 UTC) #23
Igor Sheludko
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#newcode274 src/api-natives.cc:274: void UnacheTemplateInstantiation(Isolate* isolate, Handle<Smi> serial_number) ...
4 years, 10 months ago (2016-02-01 20:43:55 UTC) #26
Toon Verwaest
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 ...
4 years, 10 months ago (2016-02-02 09:48:49 UTC) #27
commit-bot: I haz the power
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
4 years, 10 months ago (2016-02-02 09:54:07 UTC) #30
commit-bot: I haz the power
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
4 years, 10 months ago (2016-02-02 11:38:13 UTC) #33
commit-bot: I haz the power
Committed patchset #3 (id:80001)
4 years, 10 months ago (2016-02-02 11:41:26 UTC) #35
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/6a118774244d087b5979e9291d628a994f21d59d Cr-Commit-Position: refs/heads/master@{#33674}
4 years, 10 months ago (2016-02-02 11:42:16 UTC) #37
Michael Hablich
A revert of this CL (patchset #3 id:80001) has been created in https://codereview.chromium.org/1660263003/ by hablich@chromium.org. ...
4 years, 10 months ago (2016-02-03 09:52:16 UTC) #38
commit-bot: I haz the power
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
4 years, 10 months ago (2016-02-04 09:42:27 UTC) #41
commit-bot: I haz the power
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
4 years, 10 months ago (2016-02-04 16:29:48 UTC) #44
Igor Sheludko
PTAL relanding attempt: patch sets 4 and 5
4 years, 10 months ago (2016-02-04 16:31:39 UTC) #45
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-04 16:51:10 UTC) #47
Toon Verwaest
lgtm
4 years, 10 months ago (2016-02-05 09:21:06 UTC) #49
commit-bot: I haz the power
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
4 years, 10 months ago (2016-02-06 08:29:32 UTC) #51
commit-bot: I haz the power
Committed patchset #5 (id:120001)
4 years, 10 months ago (2016-02-06 18:10:13 UTC) #53
commit-bot: I haz the power
4 years, 10 months ago (2016-02-06 18:10:45 UTC) #55
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/da213b6e37d5509637490d5a54a1950fab795734
Cr-Commit-Position: refs/heads/master@{#33798}

Powered by Google App Engine
This is Rietveld 408576698