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

Issue 7799027: Lock the prototype of internal classes. (Closed)

Created:
9 years, 3 months ago by Lasse Reichstein
Modified:
9 years, 3 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

Lock the prototype of internal classes. Prototypes and their properties and methods are locked down to prevent fiddling with their operation, even if the build-in object leaks. Made some built-in functions only work during bootstrapping. Committed: http://code.google.com/p/v8/source/detail?r=9122

Patch Set 1 #

Total comments: 19

Patch Set 2 : Address review comments. #

Patch Set 3 : Addressed review comments. Updated to tip of branch. #

Patch Set 4 : Made the correct object fast-mode. #

Patch Set 5 : Final commit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+381 lines, -231 lines) Patch
M src/array.js View 1 2 3 4 3 chunks +13 lines, -18 lines 0 comments Download
M src/date.js View 1 2 3 4 2 chunks +6 lines, -5 lines 0 comments Download
M src/json.js View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M src/math.js View 1 2 3 4 3 chunks +6 lines, -6 lines 0 comments Download
M src/messages.js View 1 2 3 4 24 chunks +88 lines, -39 lines 0 comments Download
M src/regexp.js View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M src/runtime.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 2 3 chunks +8 lines, -0 lines 0 comments Download
M src/string.js View 1 2 3 4 2 chunks +28 lines, -32 lines 0 comments Download
M src/uri.js View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M src/v8natives.js View 1 2 3 4 12 chunks +135 lines, -118 lines 0 comments Download
M src/weakmap.js View 1 2 chunks +3 lines, -5 lines 0 comments Download
A test/mjsunit/builtins.js View 1 2 1 chunk +83 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
9 years, 3 months ago (2011-08-30 17:05:28 UTC) #1
Erik Corry
LGTM with a debug mode Sputnik run and benchmark results. http://codereview.chromium.org/7799027/diff/1/src/array.js File src/array.js (right): http://codereview.chromium.org/7799027/diff/1/src/array.js#newcode1319 ...
9 years, 3 months ago (2011-08-31 05:46:04 UTC) #2
Lasse Reichstein
9 years, 3 months ago (2011-09-01 13:30:42 UTC) #3
http://codereview.chromium.org/7799027/diff/1/src/array.js
File src/array.js (right):

http://codereview.chromium.org/7799027/diff/1/src/array.js#newcode1319
src/array.js:1319: // Setup non-enumerable constructor property on the
Array.prototype
Fixed in comments.

http://codereview.chromium.org/7799027/diff/1/src/array.js#newcode1374
src/array.js:1374: SetupLockedPrototype(InternalArray, $Array(), $Array(
Changed to SetUp....

http://codereview.chromium.org/7799027/diff/1/src/date.js
File src/date.js (right):

http://codereview.chromium.org/7799027/diff/1/src/date.js#newcode1051
src/date.js:1051: function SetupDate() {
I can do better - and make this a direct call of a function literal. 
I'm considering not making it a function at all.

http://codereview.chromium.org/7799027/diff/1/src/runtime.h
File src/runtime.h (right):

http://codereview.chromium.org/7799027/diff/1/src/runtime.h#newcode81
src/runtime.h:81: /* Utilities */ \
Changed to Check.

Powered by Google App Engine
This is Rietveld 408576698