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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 if (tryCatch.HasCaught()) { | 567 if (tryCatch.HasCaught()) { |
568 v8::Local<v8::Message> message = tryCatch.Message(); | 568 v8::Local<v8::Message> message = tryCatch.Message(); |
569 if (!message.IsEmpty()) | 569 if (!message.IsEmpty()) |
570 *exceptionMessage = toWebCoreStringWithUndefinedOrNullCheck(message-
>Get()); | 570 *exceptionMessage = toWebCoreStringWithUndefinedOrNullCheck(message-
>Get()); |
571 return; | 571 return; |
572 } | 572 } |
573 if (script.IsEmpty()) | 573 if (script.IsEmpty()) |
574 return; | 574 return; |
575 | 575 |
576 *scriptId = toWebCoreStringWithUndefinedOrNullCheck(script->Id()); | 576 *scriptId = toWebCoreStringWithUndefinedOrNullCheck(script->Id()); |
577 m_compiledScripts.set(*scriptId, adoptPtr(new ScopedPersistent<v8::Script>(s
cript))); | 577 m_compiledScripts.set(*scriptId, adoptPtr(new ScopedPersistent<v8::Script>(m
_isolate, script))); |
578 } | 578 } |
579 | 579 |
580 void ScriptDebugServer::clearCompiledScripts() | 580 void ScriptDebugServer::clearCompiledScripts() |
581 { | 581 { |
582 m_compiledScripts.clear(); | 582 m_compiledScripts.clear(); |
583 } | 583 } |
584 | 584 |
585 void ScriptDebugServer::runScript(ScriptState* state, const String& scriptId, Sc
riptValue* result, bool* wasThrown, String* exceptionMessage) | 585 void ScriptDebugServer::runScript(ScriptState* state, const String& scriptId, Sc
riptValue* result, bool* wasThrown, String* exceptionMessage) |
586 { | 586 { |
587 if (!m_compiledScripts.contains(scriptId)) | 587 if (!m_compiledScripts.contains(scriptId)) |
(...skipping 26 matching lines...) Expand all Loading... |
614 { | 614 { |
615 return PassOwnPtr<ScriptSourceCode>(); | 615 return PassOwnPtr<ScriptSourceCode>(); |
616 } | 616 } |
617 | 617 |
618 String ScriptDebugServer::preprocessEventListener(Frame*, const String& source,
const String& url, const String& functionName) | 618 String ScriptDebugServer::preprocessEventListener(Frame*, const String& source,
const String& url, const String& functionName) |
619 { | 619 { |
620 return source; | 620 return source; |
621 } | 621 } |
622 | 622 |
623 } // namespace WebCore | 623 } // namespace WebCore |
OLD | NEW |