Chromium Code Reviews| Index: Source/bindings/v8/PageScriptDebugServer.cpp |
| diff --git a/Source/bindings/v8/PageScriptDebugServer.cpp b/Source/bindings/v8/PageScriptDebugServer.cpp |
| index 8ee19c6564a8a96284d9384f5b2c2e24706ba95a..6ddfaa1a4dd8e63d9e865d3e11aa414ae85d7a7c 100644 |
| --- a/Source/bindings/v8/PageScriptDebugServer.cpp |
| +++ b/Source/bindings/v8/PageScriptDebugServer.cpp |
| @@ -64,6 +64,13 @@ static Frame* retrieveFrameWithGlobalObjectCheck(v8::Handle<v8::Context> context |
| return toFrameIfNotDetached(context); |
| } |
| +ScriptController* PageScriptDebugServer::scriptController(v8::Handle<v8::Context> context) |
| +{ |
| + Frame* frame = retrieveFrameWithGlobalObjectCheck(context); |
| + if (frame) |
|
abarth-chromium
2013/07/08 23:57:08
You can merge these two lines.
johnjbarton
2013/07/09 22:44:54
I tried that but the presumbit failed with:
More t
|
| + return frame->page()->mainFrame()->script(); |
|
abarth-chromium
2013/07/08 23:57:08
What if frame->page() is zero?
johnjbarton
2013/07/09 22:44:54
Done.
|
| +} |
| + |
| PageScriptDebugServer& PageScriptDebugServer::shared() |
| { |
| DEFINE_STATIC_LOCAL(PageScriptDebugServer, server, ()); |