Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: Source/bindings/core/v8/PageScriptDebugServer.h

Issue 1132793002: DevTools: do not enable debugger for pages where script execution is prohibited (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 virtual ~ClientMessageLoop() { } 51 virtual ~ClientMessageLoop() { }
52 virtual void run(LocalFrame*) = 0; 52 virtual void run(LocalFrame*) = 0;
53 virtual void quitNow() = 0; 53 virtual void quitNow() = 0;
54 }; 54 };
55 55
56 PageScriptDebugServer(PassOwnPtr<ClientMessageLoop>, v8::Isolate*); 56 PageScriptDebugServer(PassOwnPtr<ClientMessageLoop>, v8::Isolate*);
57 ~PageScriptDebugServer() override; 57 ~PageScriptDebugServer() override;
58 DECLARE_VIRTUAL_TRACE(); 58 DECLARE_VIRTUAL_TRACE();
59 59
60 static void setContextDebugData(v8::Local<v8::Context>, const String& type, int contextDebugId); 60 static void setContextDebugData(v8::Local<v8::Context>, const String& type, int contextDebugId);
61 void addListener(ScriptDebugListener*, LocalFrame*, int contextDebugId); 61 bool addListener(ScriptDebugListener*, LocalFrame*, int contextDebugId);
62 void removeListener(ScriptDebugListener*, LocalFrame*); 62 void removeListener(ScriptDebugListener*, LocalFrame*);
63 63
64 static PageScriptDebugServer* instance(); 64 static PageScriptDebugServer* instance();
65 static void interruptMainThreadAndRun(PassOwnPtr<Task>); 65 static void interruptMainThreadAndRun(PassOwnPtr<Task>);
66 66
67 void compileScript(ScriptState*, const String& expression, const String& sou rceURL, bool persistScript, String* scriptId, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stackTrace) override; 67 void compileScript(ScriptState*, const String& expression, const String& sou rceURL, bool persistScript, String* scriptId, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stackTrace) override;
68 void runScript(ScriptState*, const String& scriptId, ScriptValue* result, bo ol* wasThrown, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stackTrace) override; 68 void runScript(ScriptState*, const String& scriptId, ScriptValue* result, bo ol* wasThrown, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stackTrace) override;
69 69
70 private: 70 private:
71 ScriptDebugListener* getDebugListenerForContext(v8::Local<v8::Context>) over ride; 71 ScriptDebugListener* getDebugListenerForContext(v8::Local<v8::Context>) over ride;
72 void clearCompiledScripts() override; 72 void clearCompiledScripts() override;
73 void runMessageLoopOnPause(v8::Local<v8::Context>) override; 73 void runMessageLoopOnPause(v8::Local<v8::Context>) override;
74 void quitMessageLoopOnPause() override; 74 void quitMessageLoopOnPause() override;
75 static WTF::Mutex& creationMutex(); 75 static WTF::Mutex& creationMutex();
76 76
77 using ListenersMap = WillBeHeapHashMap<RawPtrWillBeMember<LocalFrame>, Scrip tDebugListener*>; 77 using ListenersMap = WillBeHeapHashMap<RawPtrWillBeMember<LocalFrame>, Scrip tDebugListener*>;
78 ListenersMap m_listenersMap; 78 ListenersMap m_listenersMap;
79 OwnPtr<ClientMessageLoop> m_clientMessageLoop; 79 OwnPtr<ClientMessageLoop> m_clientMessageLoop;
80 RawPtrWillBeMember<LocalFrame> m_pausedFrame; 80 RawPtrWillBeMember<LocalFrame> m_pausedFrame;
81 HashMap<String, String> m_compiledScriptURLs; 81 HashMap<String, String> m_compiledScriptURLs;
82 82
83 static PageScriptDebugServer* s_instance; 83 static PageScriptDebugServer* s_instance;
84 }; 84 };
85 85
86 } // namespace blink 86 } // namespace blink
87 87
88 88
89 #endif // PageScriptDebugServer_h 89 #endif // PageScriptDebugServer_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/PageScriptDebugServer.cpp » ('j') | Source/bindings/core/v8/PageScriptDebugServer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698