Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 266 v8::HandleScope handles(m_context->isolate()); | 266 v8::HandleScope handles(m_context->isolate()); |
| 267 V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value (), "setCustomObjectFormatterEnabled"); | 267 V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value (), "setCustomObjectFormatterEnabled"); |
| 268 function.appendArgument(enabled); | 268 function.appendArgument(enabled); |
| 269 bool hadException = false; | 269 bool hadException = false; |
| 270 function.call(hadException); | 270 function.call(hadException); |
| 271 DCHECK(!hadException); | 271 DCHECK(!hadException); |
| 272 } | 272 } |
| 273 | 273 |
| 274 bool InjectedScript::canAccessInspectedWindow() const | 274 bool InjectedScript::canAccessInspectedWindow() const |
| 275 { | 275 { |
| 276 v8::Local<v8::Context> callingContext = m_context->isolate()->GetCallingCont ext(); | 276 v8::Local<v8::Context> callingContext; |
|
haraken
2016/06/07 14:07:30
callingContext => debuggerContext ?
| |
| 277 if (callingContext.IsEmpty()) | 277 if (!v8::Debug::GetDebuggedContext(m_context->isolate()).ToLocal(&callingCon text)) |
|
dgozman
2016/06/09 08:53:45
Note that GetDebuggedContext says "while in debug
| |
| 278 return true; | 278 return true; |
| 279 return m_context->debugger()->client()->callingContextCanAccessContext(calli ngContext, m_context->context()); | 279 return m_context->debugger()->client()->callingContextCanAccessContext(calli ngContext, m_context->context()); |
| 280 } | 280 } |
| 281 | 281 |
| 282 v8::Local<v8::Value> InjectedScript::v8Value() const | 282 v8::Local<v8::Value> InjectedScript::v8Value() const |
| 283 { | 283 { |
| 284 return m_value.Get(m_context->isolate()); | 284 return m_value.Get(m_context->isolate()); |
| 285 } | 285 } |
| 286 | 286 |
| 287 v8::Local<v8::Value> InjectedScript::lastEvaluationResult() const | 287 v8::Local<v8::Value> InjectedScript::lastEvaluationResult() const |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 518 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl* session) | 518 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl* session) |
| 519 { | 519 { |
| 520 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err orString, m_remoteCallFrameId); | 520 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err orString, m_remoteCallFrameId); |
| 521 if (!remoteId) | 521 if (!remoteId) |
| 522 return; | 522 return; |
| 523 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); | 523 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); |
| 524 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get() ); | 524 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get() ); |
| 525 } | 525 } |
| 526 | 526 |
| 527 } // namespace blink | 527 } // namespace blink |
| OLD | NEW |