| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 { | 795 { |
| 796 if (world != mainThreadNormalWorld()) | 796 if (world != mainThreadNormalWorld()) |
| 797 return; | 797 return; |
| 798 | 798 |
| 799 if (frame == m_page->mainFrame()) | 799 if (frame == m_page->mainFrame()) |
| 800 m_injectedScriptManager->discardInjectedScripts(); | 800 m_injectedScriptManager->discardInjectedScripts(); |
| 801 | 801 |
| 802 if (!m_frontend) | 802 if (!m_frontend) |
| 803 return; | 803 return; |
| 804 | 804 |
| 805 v8::HandleScope handleScope; |
| 806 v8::Handle<v8::Context> v8Context = ScriptController::mainWorldContext(frame
); |
| 807 V8ScopedCompilation debuggerCompilation(v8Context, DevtoolsScriptCompilation
); |
| 808 |
| 805 RefPtr<InspectorObject> scripts = m_state->getObject(PageAgentState::pageAge
ntScriptsToEvaluateOnLoad); | 809 RefPtr<InspectorObject> scripts = m_state->getObject(PageAgentState::pageAge
ntScriptsToEvaluateOnLoad); |
| 806 if (scripts) { | 810 if (scripts) { |
| 807 InspectorObject::const_iterator end = scripts->end(); | 811 InspectorObject::const_iterator end = scripts->end(); |
| 808 for (InspectorObject::const_iterator it = scripts->begin(); it != end; +
+it) { | 812 for (InspectorObject::const_iterator it = scripts->begin(); it != end; +
+it) { |
| 809 String scriptText; | 813 String scriptText; |
| 810 if (it->value->asString(&scriptText)) | 814 if (it->value->asString(&scriptText)) |
| 811 frame->script()->executeScript(scriptText); | 815 frame->script()->executeScript(scriptText); |
| 812 } | 816 } |
| 813 } | 817 } |
| 814 if (!m_scriptToEvaluateOnLoadOnce.isEmpty()) | 818 if (!m_scriptToEvaluateOnLoadOnce.isEmpty()) |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 // Handled on the browser level. | 1224 // Handled on the browser level. |
| 1221 } | 1225 } |
| 1222 | 1226 |
| 1223 void InspectorPageAgent::handleJavaScriptDialog(ErrorString* errorString, bool a
ccept, const String* promptText) | 1227 void InspectorPageAgent::handleJavaScriptDialog(ErrorString* errorString, bool a
ccept, const String* promptText) |
| 1224 { | 1228 { |
| 1225 // Handled on the browser level. | 1229 // Handled on the browser level. |
| 1226 } | 1230 } |
| 1227 | 1231 |
| 1228 } // namespace WebCore | 1232 } // namespace WebCore |
| 1229 | 1233 |
| OLD | NEW |