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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 Handle<v8::internal::Context> debug_context = | 111 Handle<v8::internal::Context> debug_context = |
112 isolate->debug()->debug_context(); | 112 isolate->debug()->debug_context(); |
113 debug_context->set_security_token( | 113 debug_context->set_security_token( |
114 v8::Utils::OpenHandle(*context_)->security_token()); | 114 v8::Utils::OpenHandle(*context_)->security_token()); |
115 | 115 |
116 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast( | 116 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast( |
117 v8::Utils::OpenHandle(*context_->Global()))); | 117 v8::Utils::OpenHandle(*context_->Global()))); |
118 Handle<v8::internal::String> debug_string = | 118 Handle<v8::internal::String> debug_string = |
119 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("debug")); | 119 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("debug")); |
120 v8::internal::JSObject::SetOwnPropertyIgnoreAttributes( | 120 v8::internal::JSObject::SetOwnPropertyIgnoreAttributes( |
121 global, debug_string, handle(debug_context->global_proxy()), DONT_ENUM) | 121 global, debug_string, handle(debug_context->global_proxy()), |
| 122 v8::internal::DONT_ENUM) |
122 .Check(); | 123 .Check(); |
123 } | 124 } |
124 | 125 |
125 private: | 126 private: |
126 v8::HandleScope scope_; | 127 v8::HandleScope scope_; |
127 v8::Local<v8::Context> context_; | 128 v8::Local<v8::Context> context_; |
128 }; | 129 }; |
129 | 130 |
130 | 131 |
131 // --- H e l p e r F u n c t i o n s | 132 // --- H e l p e r F u n c t i o n s |
(...skipping 7933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8065 CompileRun("function foo() {}; foo();"); | 8066 CompileRun("function foo() {}; foo();"); |
8066 --after_compile_handler_depth; | 8067 --after_compile_handler_depth; |
8067 } | 8068 } |
8068 | 8069 |
8069 | 8070 |
8070 TEST(NoInterruptsInDebugListener) { | 8071 TEST(NoInterruptsInDebugListener) { |
8071 DebugLocalContext env; | 8072 DebugLocalContext env; |
8072 v8::Debug::SetDebugEventListener(env->GetIsolate(), NoInterruptsOnDebugEvent); | 8073 v8::Debug::SetDebugEventListener(env->GetIsolate(), NoInterruptsOnDebugEvent); |
8073 CompileRun("void(0);"); | 8074 CompileRun("void(0);"); |
8074 } | 8075 } |
OLD | NEW |