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

Unified Diff: src/runtime.cc

Issue 6893057: Fix a bug in a corner case of direct eval detection. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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/eval.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 ff0503718b5c93262a33eda9f7ab8d24a6d379a4..42357d6cd329a8c5c7ac5a9fa99ed453c632ad60 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -8244,10 +8244,7 @@ RUNTIME_FUNCTION(ObjectPair, Runtime_ResolvePossiblyDirectEval) {
if (!context->IsGlobalContext()) {
// 'eval' is not bound in the global context. Just call the function
// with the given arguments. This is not necessarily the global eval.
- if (receiver->IsContext()) {
- context = Handle<Context>::cast(receiver);
- receiver = Handle<Object>(context->get(index), isolate);
- } else if (receiver->IsJSContextExtensionObject()) {
+ if (receiver->IsContext() || receiver->IsJSContextExtensionObject()) {
receiver = Handle<JSObject>(
isolate->context()->global()->global_receiver(), isolate);
}
« no previous file with comments | « no previous file | test/mjsunit/eval.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698