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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // Expose the debug context global object in the global object for testing. | 100 // Expose the debug context global object in the global object for testing. |
101 CHECK(isolate->debug()->Load()); | 101 CHECK(isolate->debug()->Load()); |
102 Handle<v8::internal::Context> debug_context = | 102 Handle<v8::internal::Context> debug_context = |
103 isolate->debug()->debug_context(); | 103 isolate->debug()->debug_context(); |
104 debug_context->set_security_token( | 104 debug_context->set_security_token( |
105 v8::Utils::OpenHandle(*context_)->security_token()); | 105 v8::Utils::OpenHandle(*context_)->security_token()); |
106 | 106 |
107 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast( | 107 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast( |
108 v8::Utils::OpenHandle(*context_->Global()))); | 108 v8::Utils::OpenHandle(*context_->Global()))); |
109 Handle<v8::internal::String> debug_string = | 109 Handle<v8::internal::String> debug_string = |
110 factory->InternalizeOneByteString(STATIC_ASCII_VECTOR("debug")); | 110 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("debug")); |
111 v8::internal::Runtime::DefineObjectProperty(global, debug_string, | 111 v8::internal::Runtime::DefineObjectProperty(global, debug_string, |
112 handle(debug_context->global_proxy(), isolate), DONT_ENUM).Check(); | 112 handle(debug_context->global_proxy(), isolate), DONT_ENUM).Check(); |
113 } | 113 } |
114 | 114 |
115 private: | 115 private: |
116 v8::HandleScope scope_; | 116 v8::HandleScope scope_; |
117 v8::Local<v8::Context> context_; | 117 v8::Local<v8::Context> context_; |
118 }; | 118 }; |
119 | 119 |
120 | 120 |
(...skipping 7294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7415 v8::Isolate* isolate = env->GetIsolate(); | 7415 v8::Isolate* isolate = env->GetIsolate(); |
7416 v8::HandleScope scope(isolate); | 7416 v8::HandleScope scope(isolate); |
7417 v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate); | 7417 v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate); |
7418 TerminationThread terminator(isolate); | 7418 TerminationThread terminator(isolate); |
7419 terminator.Start(); | 7419 terminator.Start(); |
7420 v8::TryCatch try_catch; | 7420 v8::TryCatch try_catch; |
7421 v8::Debug::DebugBreak(isolate); | 7421 v8::Debug::DebugBreak(isolate); |
7422 CompileRun("while (true);"); | 7422 CompileRun("while (true);"); |
7423 CHECK(try_catch.HasTerminated()); | 7423 CHECK(try_catch.HasTerminated()); |
7424 } | 7424 } |
OLD | NEW |