| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // Expose the debug context global object in the global object for testing. | 146 // Expose the debug context global object in the global object for testing. |
| 147 Debug::Load(); | 147 Debug::Load(); |
| 148 Debug::debug_context()->set_security_token( | 148 Debug::debug_context()->set_security_token( |
| 149 v8::Utils::OpenHandle(*context_)->security_token()); | 149 v8::Utils::OpenHandle(*context_)->security_token()); |
| 150 | 150 |
| 151 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast( | 151 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast( |
| 152 v8::Utils::OpenHandle(*context_->Global()))); | 152 v8::Utils::OpenHandle(*context_->Global()))); |
| 153 Handle<v8::internal::String> debug_string = | 153 Handle<v8::internal::String> debug_string = |
| 154 v8::internal::Factory::LookupAsciiSymbol("debug"); | 154 v8::internal::Factory::LookupAsciiSymbol("debug"); |
| 155 SetProperty(global, debug_string, | 155 SetProperty(global, debug_string, |
| 156 Handle<Object>(Debug::debug_context()->global_proxy()), DONT_ENUM); | 156 Handle<Object>(Debug::debug_context()->global_proxy()), DONT_ENUM, |
| 157 ::v8::internal::kNonStrictMode); |
| 157 } | 158 } |
| 158 private: | 159 private: |
| 159 v8::Persistent<v8::Context> context_; | 160 v8::Persistent<v8::Context> context_; |
| 160 }; | 161 }; |
| 161 | 162 |
| 162 | 163 |
| 163 // --- H e l p e r F u n c t i o n s | 164 // --- H e l p e r F u n c t i o n s |
| 164 | 165 |
| 165 | 166 |
| 166 // Compile and run the supplied source and return the fequested function. | 167 // Compile and run the supplied source and return the fequested function. |
| (...skipping 7027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7194 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); | 7195 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); |
| 7195 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); | 7196 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); |
| 7196 | 7197 |
| 7197 // Get rid of the debug event listener. | 7198 // Get rid of the debug event listener. |
| 7198 v8::Debug::SetDebugEventListener(NULL); | 7199 v8::Debug::SetDebugEventListener(NULL); |
| 7199 CheckDebuggerUnloaded(); | 7200 CheckDebuggerUnloaded(); |
| 7200 } | 7201 } |
| 7201 | 7202 |
| 7202 | 7203 |
| 7203 #endif // ENABLE_DEBUGGER_SUPPORT | 7204 #endif // ENABLE_DEBUGGER_SUPPORT |
| OLD | NEW |