| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 if (global.IsEmpty()) | 58 if (global.IsEmpty()) |
| 59 return 0; | 59 return 0; |
| 60 | 60 |
| 61 global = global->FindInstanceInPrototypeChain(V8DOMWindow::GetTemplate(conte
xt->GetIsolate(), worldTypeInMainThread(context->GetIsolate()))); | 61 global = global->FindInstanceInPrototypeChain(V8DOMWindow::GetTemplate(conte
xt->GetIsolate(), worldTypeInMainThread(context->GetIsolate()))); |
| 62 if (global.IsEmpty()) | 62 if (global.IsEmpty()) |
| 63 return 0; | 63 return 0; |
| 64 | 64 |
| 65 return toFrameIfNotDetached(context); | 65 return toFrameIfNotDetached(context); |
| 66 } | 66 } |
| 67 | 67 |
| 68 ScriptController* PageScriptDebugServer::scriptController(v8::Handle<v8::Context
> context) |
| 69 { |
| 70 Frame* frame = retrieveFrameWithGlobalObjectCheck(context); |
| 71 if (frame) |
| 72 return frame->page()->mainFrame()->script(); |
| 73 } |
| 74 |
| 68 PageScriptDebugServer& PageScriptDebugServer::shared() | 75 PageScriptDebugServer& PageScriptDebugServer::shared() |
| 69 { | 76 { |
| 70 DEFINE_STATIC_LOCAL(PageScriptDebugServer, server, ()); | 77 DEFINE_STATIC_LOCAL(PageScriptDebugServer, server, ()); |
| 71 return server; | 78 return server; |
| 72 } | 79 } |
| 73 | 80 |
| 74 PageScriptDebugServer::PageScriptDebugServer() | 81 PageScriptDebugServer::PageScriptDebugServer() |
| 75 : ScriptDebugServer(v8::Isolate::GetCurrent()) | 82 : ScriptDebugServer(v8::Isolate::GetCurrent()) |
| 76 , m_pausedPage(0) | 83 , m_pausedPage(0) |
| 77 { | 84 { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 192 |
| 186 m_pausedPage = 0; | 193 m_pausedPage = 0; |
| 187 } | 194 } |
| 188 | 195 |
| 189 void PageScriptDebugServer::quitMessageLoopOnPause() | 196 void PageScriptDebugServer::quitMessageLoopOnPause() |
| 190 { | 197 { |
| 191 m_clientMessageLoop->quitNow(); | 198 m_clientMessageLoop->quitNow(); |
| 192 } | 199 } |
| 193 | 200 |
| 194 } // namespace WebCore | 201 } // namespace WebCore |
| OLD | NEW |