| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 if (!ApiCheck(isolate->handle_scope_implementer()->LeaveLastContext(), | 763 if (!ApiCheck(isolate->handle_scope_implementer()->LeaveLastContext(), |
| 764 "v8::Context::Exit()", | 764 "v8::Context::Exit()", |
| 765 "Cannot exit non-entered context")) { | 765 "Cannot exit non-entered context")) { |
| 766 return; | 766 return; |
| 767 } | 767 } |
| 768 | 768 |
| 769 // Content of 'last_context' could be NULL. | 769 // Content of 'last_context' could be NULL. |
| 770 i::Context* last_context = | 770 i::Context* last_context = |
| 771 isolate->handle_scope_implementer()->RestoreContext(); | 771 isolate->handle_scope_implementer()->RestoreContext(); |
| 772 isolate->set_context(last_context); | 772 isolate->set_context(last_context); |
| 773 isolate->set_context_exit_happened(true); |
| 773 } | 774 } |
| 774 | 775 |
| 775 | 776 |
| 776 static void* DecodeSmiToAligned(i::Object* value, const char* location) { | 777 static void* DecodeSmiToAligned(i::Object* value, const char* location) { |
| 777 ApiCheck(value->IsSmi(), location, "Not a Smi"); | 778 ApiCheck(value->IsSmi(), location, "Not a Smi"); |
| 778 return reinterpret_cast<void*>(value); | 779 return reinterpret_cast<void*>(value); |
| 779 } | 780 } |
| 780 | 781 |
| 781 | 782 |
| 782 static i::Smi* EncodeAlignedAsSmi(void* value, const char* location) { | 783 static i::Smi* EncodeAlignedAsSmi(void* value, const char* location) { |
| (...skipping 7269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8052 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8053 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 8053 Address callback_address = | 8054 Address callback_address = |
| 8054 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8055 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8055 VMState<EXTERNAL> state(isolate); | 8056 VMState<EXTERNAL> state(isolate); |
| 8056 ExternalCallbackScope call_scope(isolate, callback_address); | 8057 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8057 return callback(info); | 8058 return callback(info); |
| 8058 } | 8059 } |
| 8059 | 8060 |
| 8060 | 8061 |
| 8061 } } // namespace v8::internal | 8062 } } // namespace v8::internal |
| OLD | NEW |