| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 CHECK(isolate->debug()->Load()); | 108 CHECK(isolate->debug()->Load()); |
| 109 Handle<v8::internal::Context> debug_context = | 109 Handle<v8::internal::Context> debug_context = |
| 110 isolate->debug()->debug_context(); | 110 isolate->debug()->debug_context(); |
| 111 debug_context->set_security_token( | 111 debug_context->set_security_token( |
| 112 v8::Utils::OpenHandle(*context_)->security_token()); | 112 v8::Utils::OpenHandle(*context_)->security_token()); |
| 113 | 113 |
| 114 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast( | 114 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast( |
| 115 v8::Utils::OpenHandle(*context_->Global()))); | 115 v8::Utils::OpenHandle(*context_->Global()))); |
| 116 Handle<v8::internal::String> debug_string = | 116 Handle<v8::internal::String> debug_string = |
| 117 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("debug")); | 117 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("debug")); |
| 118 v8::internal::JSObject::SetOwnPropertyIgnoreAttributes( | 118 v8::internal::Runtime::DefineObjectProperty(global, debug_string, |
| 119 global, debug_string, handle(debug_context->global_proxy()), DONT_ENUM) | 119 handle(debug_context->global_proxy(), isolate), DONT_ENUM).Check(); |
| 120 .Check(); | |
| 121 } | 120 } |
| 122 | 121 |
| 123 private: | 122 private: |
| 124 v8::HandleScope scope_; | 123 v8::HandleScope scope_; |
| 125 v8::Local<v8::Context> context_; | 124 v8::Local<v8::Context> context_; |
| 126 }; | 125 }; |
| 127 | 126 |
| 128 | 127 |
| 129 // --- H e l p e r F u n c t i o n s | 128 // --- H e l p e r F u n c t i o n s |
| 130 | 129 |
| (...skipping 7516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7647 "let y = 2; \n" | 7646 "let y = 2; \n" |
| 7648 "debugger; \n" | 7647 "debugger; \n" |
| 7649 "x * y", | 7648 "x * y", |
| 7650 30); | 7649 30); |
| 7651 ExpectInt32( | 7650 ExpectInt32( |
| 7652 "x = 1; y = 2; \n" | 7651 "x = 1; y = 2; \n" |
| 7653 "debugger;" | 7652 "debugger;" |
| 7654 "x * y", | 7653 "x * y", |
| 7655 30); | 7654 30); |
| 7656 } | 7655 } |
| OLD | NEW |