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

Side by Side Diff: src/top.h

Issue 113622: Expose the calling context through the API. ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | src/top.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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // a builtin object, or a js global object. 248 // a builtin object, or a js global object.
249 static Handle<GlobalObject> global() { 249 static Handle<GlobalObject> global() {
250 return Handle<GlobalObject>(context()->global()); 250 return Handle<GlobalObject>(context()->global());
251 } 251 }
252 252
253 // Returns the global proxy object of the current context. 253 // Returns the global proxy object of the current context.
254 static Object* global_proxy() { 254 static Object* global_proxy() {
255 return context()->global_proxy(); 255 return context()->global_proxy();
256 } 256 }
257 257
258 // Returns the current global context.
258 static Handle<Context> global_context(); 259 static Handle<Context> global_context();
259 260
261 // Returns the global context of the calling JavaScript code. That
262 // is, the global context of the top-most JavaScript frame.
263 static Handle<Context> GetCallingGlobalContext();
264
260 static Handle<JSBuiltinsObject> builtins() { 265 static Handle<JSBuiltinsObject> builtins() {
261 return Handle<JSBuiltinsObject>(thread_local_.context_->builtins()); 266 return Handle<JSBuiltinsObject>(thread_local_.context_->builtins());
262 } 267 }
263 268
264 static Object* LookupSpecialFunction(JSObject* receiver, 269 static Object* LookupSpecialFunction(JSObject* receiver,
265 JSObject* prototype, 270 JSObject* prototype,
266 JSFunction* value); 271 JSFunction* value);
267 272
268 static void RegisterTryCatchHandler(v8::TryCatch* that); 273 static void RegisterTryCatchHandler(v8::TryCatch* that);
269 static void UnregisterTryCatchHandler(v8::TryCatch* that); 274 static void UnregisterTryCatchHandler(v8::TryCatch* that);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 373
369 class ExecutionAccess BASE_EMBEDDED { 374 class ExecutionAccess BASE_EMBEDDED {
370 public: 375 public:
371 ExecutionAccess(); 376 ExecutionAccess();
372 ~ExecutionAccess(); 377 ~ExecutionAccess();
373 }; 378 };
374 379
375 } } // namespace v8::internal 380 } } // namespace v8::internal
376 381
377 #endif // V8_TOP_H_ 382 #endif // V8_TOP_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/top.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698