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

Unified Diff: Source/bindings/v8/V8DOMActivityLogger.h

Issue 257803006: Fixing wrong extension ID in Activity Log entries. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: bug fix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/DOMWrapperWorld.cpp ('k') | Source/bindings/v8/V8DOMActivityLogger.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8DOMActivityLogger.h
diff --git a/Source/bindings/v8/V8DOMActivityLogger.h b/Source/bindings/v8/V8DOMActivityLogger.h
index 55f28d10d2bd7de22bc3e1c4cdbc7df4fe232165..0f6b05c8e3c4b5e72476658209f1e3b5232b5ada 100644
--- a/Source/bindings/v8/V8DOMActivityLogger.h
+++ b/Source/bindings/v8/V8DOMActivityLogger.h
@@ -37,6 +37,8 @@
namespace WebCore {
+class KURL;
+
class V8DOMActivityLogger {
public:
virtual ~V8DOMActivityLogger() { }
@@ -47,9 +49,20 @@ public:
virtual void logMethod(const String& apiName, int argc, const v8::Handle<v8::Value>* argv) { }
// Associates a logger with the world identified by worldId (worlId may be 0
- // identifying the main world).
- static void setActivityLogger(int worldId, PassOwnPtr<V8DOMActivityLogger>);
- static V8DOMActivityLogger* activityLogger(int worldId);
+ // identifying the main world) and extension ID. Extension ID is used to
+ // identify a logger for main world only (worldId == 0). If the world is not
+ // a main world, an extension ID is ignored.
+ //
+ // A renderer process may host multiple extensions when the browser hits the
+ // renderer process limit. In such case, we assign multiple extensions to
+ // the same main world of a renderer process. In order to distinguish the
+ // extensions and their activity loggers in the main world, we require an
+ // extension ID. Otherwise, extension activities may be logged under
+ // a wrong extension ID.
+ static void setActivityLogger(int worldId, const String&, PassOwnPtr<V8DOMActivityLogger>);
+ static V8DOMActivityLogger* activityLogger(int worldId, const String& extensionId);
+ static V8DOMActivityLogger* activityLogger(int worldId, const KURL&);
+
};
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/DOMWrapperWorld.cpp ('k') | Source/bindings/v8/V8DOMActivityLogger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698