OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |