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

Side by Side Diff: src/top.cc

Issue 402006: Merge r3310 and r3311 to 1.3 branch (Closed) Base URL: http://v8.googlecode.com/svn/branches/1.3/
Patch Set: Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 934
935 935
936 Handle<Context> Top::global_context() { 936 Handle<Context> Top::global_context() {
937 GlobalObject* global = thread_local_.context_->global(); 937 GlobalObject* global = thread_local_.context_->global();
938 return Handle<Context>(global->global_context()); 938 return Handle<Context>(global->global_context());
939 } 939 }
940 940
941 941
942 Handle<Context> Top::GetCallingGlobalContext() { 942 Handle<Context> Top::GetCallingGlobalContext() {
943 JavaScriptFrameIterator it; 943 JavaScriptFrameIterator it;
944 #ifdef ENABLE_DEBUGGER_SUPPORT
945 if (Debug::InDebugger()) {
946 while (!it.done()) {
947 JavaScriptFrame* frame = it.frame();
948 Context* context = Context::cast(frame->context());
949 if (context->global_context() == *Debug::debug_context()) {
950 it.Advance();
951 } else {
952 break;
953 }
954 }
955 }
956 #endif // ENABLE_DEBUGGER_SUPPORT
944 if (it.done()) return Handle<Context>::null(); 957 if (it.done()) return Handle<Context>::null();
945 JavaScriptFrame* frame = it.frame(); 958 JavaScriptFrame* frame = it.frame();
946 Context* context = Context::cast(frame->context()); 959 Context* context = Context::cast(frame->context());
947 return Handle<Context>(context->global_context()); 960 return Handle<Context>(context->global_context());
948 } 961 }
949 962
950 963
951 Object* Top::LookupSpecialFunction(JSObject* receiver, 964 Object* Top::LookupSpecialFunction(JSObject* receiver,
952 JSObject* prototype, 965 JSObject* prototype,
953 JSFunction* function) { 966 JSFunction* function) {
(...skipping 27 matching lines...) Expand all
981 Top::break_access_->Lock(); 994 Top::break_access_->Lock();
982 } 995 }
983 996
984 997
985 ExecutionAccess::~ExecutionAccess() { 998 ExecutionAccess::~ExecutionAccess() {
986 Top::break_access_->Unlock(); 999 Top::break_access_->Unlock();
987 } 1000 }
988 1001
989 1002
990 } } // namespace v8::internal 1003 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698