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

Issue 2474843003: Allow the global object to be frozen through the global template (Closed)

Created:
4 years, 1 month ago by Dan Ehrenberg
Modified:
4 years, 1 month ago
Reviewers:
adamk
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Allow the global object to be frozen through the global template This patch fixes two bugs in V8 to allow the global object to have a frozen proto: - The immutable prototype map check is done on the map of the "real receiver", the one that's found after the hidden prototype traversal, rather than the object that SetPrototype is called on. - The immutable prototype bit from the ObjectTemplate used to instantiate the global object, as passed to Context::New, is respected when instantiating the global object. R=adamk BUG=v8:5149 Committed: https://crrev.com/3a5c693310c4e565c03064302ef01d459f16b5bc Cr-Commit-Position: refs/heads/master@{#40778}

Patch Set 1 #

Patch Set 2 : Format #

Total comments: 2

Patch Set 3 : Refactor to keep all template logic in api #

Total comments: 1

Patch Set 4 : Nit cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -1 line) Patch
M src/api-natives.cc View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-api.cc View 1 2 1 chunk +41 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (17 generated)
Dan Ehrenberg
4 years, 1 month ago (2016-11-03 23:31:27 UTC) #3
adamk
https://codereview.chromium.org/2474843003/diff/20001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/2474843003/diff/20001/src/bootstrapper.cc#newcode951 src/bootstrapper.cc:951: if (js_global_object_template->immutable_proto()) I think you can do this check ...
4 years, 1 month ago (2016-11-04 17:39:19 UTC) #11
Dan Ehrenberg
Made suggested changes; PTAL https://codereview.chromium.org/2474843003/diff/20001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/2474843003/diff/20001/src/bootstrapper.cc#newcode951 src/bootstrapper.cc:951: if (js_global_object_template->immutable_proto()) On 2016/11/04 at ...
4 years, 1 month ago (2016-11-04 17:56:36 UTC) #12
Dan Ehrenberg
Made suggested changes; PTAL
4 years, 1 month ago (2016-11-04 17:56:37 UTC) #13
adamk
lgtm once this nit is handled https://codereview.chromium.org/2474843003/diff/40001/src/api-natives.cc File src/api-natives.cc (right): https://codereview.chromium.org/2474843003/diff/40001/src/api-natives.cc#newcode656 src/api-natives.cc:656: if (immutable_proto) map->set_immutable_proto(true); ...
4 years, 1 month ago (2016-11-04 18:06:12 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2474843003/60001
4 years, 1 month ago (2016-11-04 18:13:43 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-04 18:37:30 UTC) #23
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 22:23:33 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/3a5c693310c4e565c03064302ef01d459f16b5bc
Cr-Commit-Position: refs/heads/master@{#40778}

Powered by Google App Engine
This is Rietveld 408576698