| 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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 } | 686 } |
| 687 | 687 |
| 688 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) | 688 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) |
| 689 { | 689 { |
| 690 if (!scriptState->contextIsValid()) | 690 if (!scriptState->contextIsValid()) |
| 691 return; | 691 return; |
| 692 ScriptState::Scope scope(scriptState); | 692 ScriptState::Scope scope(scriptState); |
| 693 | 693 |
| 694 v8::Handle<v8::String> source = v8String(m_isolate, expression); | 694 v8::Handle<v8::String> source = v8String(m_isolate, expression); |
| 695 v8::TryCatch tryCatch; | 695 v8::TryCatch tryCatch; |
| 696 v8::Local<v8::Script> script = V8ScriptRunner::compileScript(source, sourceU
RL, TextPosition(), 0, 0, m_isolate); | 696 v8::Local<v8::Script> script = V8ScriptRunner::compileScript(source, sourceU
RL, TextPosition(), m_isolate); |
| 697 if (tryCatch.HasCaught()) { | 697 if (tryCatch.HasCaught()) { |
| 698 v8::Local<v8::Message> message = tryCatch.Message(); | 698 v8::Local<v8::Message> message = tryCatch.Message(); |
| 699 if (!message.IsEmpty()) { | 699 if (!message.IsEmpty()) { |
| 700 *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message
->Get()); | 700 *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message
->Get()); |
| 701 *lineNumber = message->GetLineNumber(); | 701 *lineNumber = message->GetLineNumber(); |
| 702 *columnNumber = message->GetStartColumn(); | 702 *columnNumber = message->GetStartColumn(); |
| 703 v8::Handle<v8::StackTrace> messageStackTrace = message->GetStackTrac
e(); | 703 v8::Handle<v8::StackTrace> messageStackTrace = message->GetStackTrac
e(); |
| 704 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount
() > 0) | 704 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount
() > 0) |
| 705 *stackTrace = createScriptCallStack(m_isolate, messageStackTrace
, messageStackTrace->GetFrameCount()); | 705 *stackTrace = createScriptCallStack(m_isolate, messageStackTrace
, messageStackTrace->GetFrameCount()); |
| 706 } | 706 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 { | 756 { |
| 757 return ScriptSourceCode(); | 757 return ScriptSourceCode(); |
| 758 } | 758 } |
| 759 | 759 |
| 760 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou
rce, const String& url, const String& functionName) | 760 String ScriptDebugServer::preprocessEventListener(LocalFrame*, const String& sou
rce, const String& url, const String& functionName) |
| 761 { | 761 { |
| 762 return source; | 762 return source; |
| 763 } | 763 } |
| 764 | 764 |
| 765 } // namespace blink | 765 } // namespace blink |
| OLD | NEW |