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

Unified Diff: src/v8natives.js

Issue 103343005: ES6: Remove __proto__ setter poison pill (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 96b88c5285c9962d479fa75d0e71031cd0c35b6c..8adb9d673b27f1d499a77c7d5b60684351db193d 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -388,8 +388,7 @@ function FromPropertyDescriptor(desc) {
}
// Must be an AccessorDescriptor then. We never return a generic descriptor.
return { get: desc.getGet(),
- set: desc.getSet() === ObjectSetProto ? ObjectPoisonProto
- : desc.getSet(),
+ set: desc.getSet(),
enumerable: desc.isEnumerable(),
configurable: desc.isConfigurable() };
}
@@ -1362,12 +1361,6 @@ function ObjectSetProto(obj) {
}
-// Harmony __proto__ poison pill.
-function ObjectPoisonProto(obj) {
- throw MakeTypeError("proto_poison_pill", []);
-}
-
-
function ObjectConstructor(x) {
if (%_IsConstructCall()) {
if (x == null) return this;
@@ -1387,8 +1380,6 @@ function SetUpObject() {
%SetNativeFlag($Object);
%SetCode($Object, ObjectConstructor);
- %FunctionSetName(ObjectPoisonProto, "__proto__");
- %FunctionRemovePrototype(ObjectPoisonProto);
%SetExpectedNumberOfProperties($Object, 4);
%SetProperty($Object.prototype, "constructor", $Object, DONT_ENUM);
« no previous file with comments | « src/messages.js ('k') | test/mjsunit/proto-accessor.js » ('j') | test/mjsunit/proto-accessor.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698