| 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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 } | 611 } |
| 612 | 612 |
| 613 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) | 613 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) |
| 614 { | 614 { |
| 615 if (scriptState->contextIsEmpty()) | 615 if (scriptState->contextIsEmpty()) |
| 616 return; | 616 return; |
| 617 ScriptState::Scope scope(scriptState); | 617 ScriptState::Scope scope(scriptState); |
| 618 | 618 |
| 619 v8::Handle<v8::String> source = v8String(m_isolate, expression); | 619 v8::Handle<v8::String> source = v8String(m_isolate, expression); |
| 620 v8::TryCatch tryCatch; | 620 v8::TryCatch tryCatch; |
| 621 v8::Local<v8::Script> script = V8ScriptRunner::compileScript(source, sourceU
RL, TextPosition(), 0, m_isolate); | 621 v8::Local<v8::Script> script = V8ScriptRunner::compileScript(source, sourceU
RL, TextPosition(), 0, 0, m_isolate); |
| 622 if (tryCatch.HasCaught()) { | 622 if (tryCatch.HasCaught()) { |
| 623 v8::Local<v8::Message> message = tryCatch.Message(); | 623 v8::Local<v8::Message> message = tryCatch.Message(); |
| 624 if (!message.IsEmpty()) { | 624 if (!message.IsEmpty()) { |
| 625 *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message
->Get()); | 625 *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message
->Get()); |
| 626 *lineNumber = message->GetLineNumber(); | 626 *lineNumber = message->GetLineNumber(); |
| 627 *columnNumber = message->GetStartColumn(); | 627 *columnNumber = message->GetStartColumn(); |
| 628 *stackTrace = createScriptCallStack(message->GetStackTrace(), messag
e->GetStackTrace()->GetFrameCount(), m_isolate); | 628 *stackTrace = createScriptCallStack(message->GetStackTrace(), messag
e->GetStackTrace()->GetFrameCount(), m_isolate); |
| 629 } | 629 } |
| 630 return; | 630 return; |
| 631 } | 631 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 { | 677 { |
| 678 return PassOwnPtr<ScriptSourceCode>(); | 678 return PassOwnPtr<ScriptSourceCode>(); |
| 679 } | 679 } |
| 680 | 680 |
| 681 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou
rce, const String& url, const String& functionName) | 681 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou
rce, const String& url, const String& functionName) |
| 682 { | 682 { |
| 683 return source; | 683 return source; |
| 684 } | 684 } |
| 685 | 685 |
| 686 } // namespace blink | 686 } // namespace blink |
| OLD | NEW |