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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 } | 641 } |
642 | 642 |
643 void ScriptDebugServer::compileScript(ScriptState* scriptState, const String& ex
pression, const String& sourceURL, String* scriptId, String* exceptionDetailsTex
t, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stac
kTrace) | 643 void ScriptDebugServer::compileScript(ScriptState* scriptState, const String& ex
pression, const String& sourceURL, String* scriptId, String* exceptionDetailsTex
t, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stac
kTrace) |
644 { | 644 { |
645 if (scriptState->contextIsValid()) | 645 if (scriptState->contextIsValid()) |
646 return; | 646 return; |
647 ScriptState::Scope scope(scriptState); | 647 ScriptState::Scope scope(scriptState); |
648 | 648 |
649 v8::Handle<v8::String> source = v8String(m_isolate, expression); | 649 v8::Handle<v8::String> source = v8String(m_isolate, expression); |
650 v8::TryCatch tryCatch; | 650 v8::TryCatch tryCatch; |
651 v8::Local<v8::Script> script = V8ScriptRunner::compileScript(source, sourceU
RL, TextPosition(), 0, m_isolate); | 651 v8::Local<v8::Script> script = V8ScriptRunner::compileScript(source, sourceU
RL, TextPosition(), 0, 0, m_isolate); |
652 if (tryCatch.HasCaught()) { | 652 if (tryCatch.HasCaught()) { |
653 v8::Local<v8::Message> message = tryCatch.Message(); | 653 v8::Local<v8::Message> message = tryCatch.Message(); |
654 if (!message.IsEmpty()) { | 654 if (!message.IsEmpty()) { |
655 *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message
->Get()); | 655 *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message
->Get()); |
656 *lineNumber = message->GetLineNumber(); | 656 *lineNumber = message->GetLineNumber(); |
657 *columnNumber = message->GetStartColumn(); | 657 *columnNumber = message->GetStartColumn(); |
658 *stackTrace = createScriptCallStack(message->GetStackTrace(), messag
e->GetStackTrace()->GetFrameCount(), m_isolate); | 658 *stackTrace = createScriptCallStack(message->GetStackTrace(), messag
e->GetStackTrace()->GetFrameCount(), m_isolate); |
659 } | 659 } |
660 return; | 660 return; |
661 } | 661 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 { | 707 { |
708 return PassOwnPtr<ScriptSourceCode>(); | 708 return PassOwnPtr<ScriptSourceCode>(); |
709 } | 709 } |
710 | 710 |
711 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou
rce, const String& url, const String& functionName) | 711 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou
rce, const String& url, const String& functionName) |
712 { | 712 { |
713 return source; | 713 return source; |
714 } | 714 } |
715 | 715 |
716 } // namespace blink | 716 } // namespace blink |
OLD | NEW |