OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2010-2011 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 listener->didParseSource(sourceID, script, compileResult); | 677 listener->didParseSource(sourceID, script, compileResult); |
678 } | 678 } |
679 | 679 |
680 void ScriptDebugServer::ensureDebuggerScriptCompiled() | 680 void ScriptDebugServer::ensureDebuggerScriptCompiled() |
681 { | 681 { |
682 if (!m_debuggerScript.IsEmpty()) | 682 if (!m_debuggerScript.IsEmpty()) |
683 return; | 683 return; |
684 | 684 |
685 v8::HandleScope scope(m_isolate); | 685 v8::HandleScope scope(m_isolate); |
686 v8::Context::Scope contextScope(v8::Debug::GetDebugContext()); | 686 v8::Context::Scope contextScope(v8::Debug::GetDebugContext()); |
687 const blink::WebData& debuggerScriptSourceResource = blink::Platform::curren
t()->loadResource("DebuggerScriptSource.js"); | 687 const WebData& debuggerScriptSourceResource = Platform::current()->loadResou
rce("DebuggerScriptSource.js"); |
688 v8::Local<v8::String> source = v8String(m_isolate, String(debuggerScriptSour
ceResource.data(), debuggerScriptSourceResource.size())); | 688 v8::Local<v8::String> source = v8String(m_isolate, String(debuggerScriptSour
ceResource.data(), debuggerScriptSourceResource.size())); |
689 v8::Local<v8::Value> value; | 689 v8::Local<v8::Value> value; |
690 if (!V8ScriptRunner::compileAndRunInternalScript(source, m_isolate).ToLocal(
&value)) | 690 if (!V8ScriptRunner::compileAndRunInternalScript(source, m_isolate).ToLocal(
&value)) |
691 return; | 691 return; |
692 ASSERT(value->IsObject()); | 692 ASSERT(value->IsObject()); |
693 m_debuggerScript.Reset(m_isolate, v8::Local<v8::Object>::Cast(value)); | 693 m_debuggerScript.Reset(m_isolate, v8::Local<v8::Object>::Cast(value)); |
694 } | 694 } |
695 | 695 |
696 v8::Local<v8::Object> ScriptDebugServer::debuggerScriptLocal() const | 696 v8::Local<v8::Object> ScriptDebugServer::debuggerScriptLocal() const |
697 { | 697 { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 *lineNumber = message->GetLineNumber(); | 815 *lineNumber = message->GetLineNumber(); |
816 *columnNumber = message->GetStartColumn(); | 816 *columnNumber = message->GetStartColumn(); |
817 v8::Local<v8::StackTrace> messageStackTrace = message->GetStackTrace
(); | 817 v8::Local<v8::StackTrace> messageStackTrace = message->GetStackTrace
(); |
818 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount
() > 0) | 818 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount
() > 0) |
819 *stackTrace = createScriptCallStack(m_isolate, messageStackTrace
, messageStackTrace->GetFrameCount()); | 819 *stackTrace = createScriptCallStack(m_isolate, messageStackTrace
, messageStackTrace->GetFrameCount()); |
820 } | 820 } |
821 } | 821 } |
822 } | 822 } |
823 | 823 |
824 } // namespace blink | 824 } // namespace blink |
OLD | NEW |