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

Unified Diff: src/runtime.cc

Issue 492303006: Handle null receiver in sloppy mode in %GetFrameDetails. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | test/mjsunit/regress/regress-crbug-405922.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 2a58b071a2353a6a114ffdb34ab1b64aef8c00b4..16164342a9a11ece230d99afc1842009c1f2d0a0 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -11500,11 +11500,13 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
if (receiver->IsUndefined()) {
receiver = handle(function->global_proxy());
} else {
- DCHECK(!receiver->IsNull());
Context* context = Context::cast(it.frame()->context());
Handle<Context> native_context(Context::cast(context->native_context()));
- receiver = Object::ToObject(
- isolate, receiver, native_context).ToHandleChecked();
+ if (!Object::ToObject(isolate, receiver, native_context)
+ .ToHandle(&receiver)) {
+ // This only happens if the receiver is forcibly set in %_CallFunction.
+ return heap->undefined_value();
+ }
}
}
details->set(kFrameDetailsReceiverIndex, *receiver);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-405922.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698