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

Unified Diff: src/builtins/builtins-object.cc

Issue 2415173003: Revert of [builtins] Also port the Object.prototype.__proto__ accessors to C++. (Closed)
Patch Set: Created 4 years, 2 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/builtins/builtins.h ('k') | src/js/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-object.cc
diff --git a/src/builtins/builtins-object.cc b/src/builtins/builtins-object.cc
index b0bb1f043d6686ccccff6e397ddbcdd0327b92fd..5899879778ad95eb83d51b3fd13e6c354518b5c0 100644
--- a/src/builtins/builtins-object.cc
+++ b/src/builtins/builtins-object.cc
@@ -722,51 +722,6 @@
return *receiver;
}
-// ES6 section B.2.2.1.1 get Object.prototype.__proto__
-BUILTIN(ObjectPrototypeGetProto) {
- HandleScope scope(isolate);
- // 1. Let O be ? ToObject(this value).
- Handle<JSReceiver> receiver;
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, receiver, Object::ToObject(isolate, args.receiver()));
-
- // 2. Return ? O.[[GetPrototypeOf]]().
- RETURN_RESULT_OR_FAILURE(isolate,
- JSReceiver::GetPrototype(isolate, receiver));
-}
-
-// ES6 section B.2.2.1.2 set Object.prototype.__proto__
-BUILTIN(ObjectPrototypeSetProto) {
- HandleScope scope(isolate);
- // 1. Let O be ? RequireObjectCoercible(this value).
- Handle<Object> object = args.receiver();
- if (object->IsNull(isolate) || object->IsUndefined(isolate)) {
- THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewTypeError(MessageTemplate::kCalledOnNullOrUndefined,
- isolate->factory()->NewStringFromAsciiChecked(
- "set Object.prototype.__proto__")));
- }
-
- // 2. If Type(proto) is neither Object nor Null, return undefined.
- Handle<Object> proto = args.at<Object>(1);
- if (!proto->IsNull(isolate) && !proto->IsJSReceiver()) {
- return isolate->heap()->undefined_value();
- }
-
- // 3. If Type(O) is not Object, return undefined.
- if (!object->IsJSReceiver()) return isolate->heap()->undefined_value();
- Handle<JSReceiver> receiver = Handle<JSReceiver>::cast(object);
-
- // 4. Let status be ? O.[[SetPrototypeOf]](proto).
- // 5. If status is false, throw a TypeError exception.
- MAYBE_RETURN(
- JSReceiver::SetPrototype(receiver, proto, true, Object::THROW_ON_ERROR),
- isolate->heap()->exception());
-
- // Return undefined.
- return isolate->heap()->undefined_value();
-}
-
// ES6 section 19.1.2.6 Object.getOwnPropertyDescriptor ( O, P )
BUILTIN(ObjectGetOwnPropertyDescriptor) {
HandleScope scope(isolate);
« no previous file with comments | « src/builtins/builtins.h ('k') | src/js/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698