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

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

Issue 1321343004: Desugar %DefaultConstructorCallSuper partially in parser. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/runtime/runtime-classes.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index 6287c98f3eb00e43a783a9df1edfe6d59301c246..2098c1cea933edce48ef63ed72116e377eace8b1 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -175,8 +175,10 @@ MaybeHandle<Object> Runtime::SetObjectProperty(Isolate* isolate,
}
-MaybeHandle<Object> Runtime::GetPrototype(Isolate* isolate,
- Handle<Object> obj) {
+RUNTIME_FUNCTION(Runtime_GetPrototype) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0);
// We don't expect access checks to be needed on JSProxy objects.
DCHECK(!obj->IsAccessCheckNeeded() || obj->IsJSObject());
PrototypeIterator iter(isolate, obj, PrototypeIterator::START_AT_RECEIVER);
@@ -184,25 +186,14 @@ MaybeHandle<Object> Runtime::GetPrototype(Isolate* isolate,
if (PrototypeIterator::GetCurrent(iter)->IsAccessCheckNeeded() &&
!isolate->MayAccess(
Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)))) {
- return isolate->factory()->null_value();
+ return isolate->heap()->null_value();
}
iter.AdvanceIgnoringProxies();
if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) {
- return PrototypeIterator::GetCurrent(iter);
+ return *PrototypeIterator::GetCurrent(iter);
}
} while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN));
- return PrototypeIterator::GetCurrent(iter);
-}
-
-
-RUNTIME_FUNCTION(Runtime_GetPrototype) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 1);
- CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0);
- Handle<Object> result;
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
- Runtime::GetPrototype(isolate, obj));
- return *result;
+ return *PrototypeIterator::GetCurrent(iter);
}
« no previous file with comments | « src/runtime/runtime-classes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698