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

Unified Diff: src/v8natives.js

Issue 450303003: Tag all prototypes as proto, except those set using __proto__ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove is_shared from Map Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/stub-cache.cc ('k') | test/mjsunit/runtime-gen/internalsetprototype.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 8484150248a13a2ef01467da31603fab1db88b0c..a8f107f6d2a54317c3a5b00d505c320cb196f6b4 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -96,7 +96,7 @@ function SetUpLockedPrototype(constructor, fields, methods) {
%AddNamedProperty(prototype, key, f, DONT_ENUM | DONT_DELETE | READ_ONLY);
%SetNativeFlag(f);
}
- %SetPrototype(prototype, null);
+ %InternalSetPrototype(prototype, null);
%ToFastProperties(prototype);
}
@@ -1125,7 +1125,8 @@ function ObjectCreate(proto, properties) {
if (!IS_SPEC_OBJECT(proto) && proto !== null) {
throw MakeTypeError("proto_object_or_null", [proto]);
}
- var obj = { __proto__: proto };
+ var obj = {};
+ %InternalSetPrototype(obj, proto);
if (!IS_UNDEFINED(properties)) ObjectDefineProperties(obj, properties);
return obj;
}
« no previous file with comments | « src/stub-cache.cc ('k') | test/mjsunit/runtime-gen/internalsetprototype.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698