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

Side by Side Diff: Source/core/inspector/InjectedScriptManager.h

Issue 556823003: Revert "Revert of [oilpan]: optimize the way we allocate persistent handles in wrappers. (patchset … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review feedback Created 6 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class InjectedScript; 42 class InjectedScript;
43 class InjectedScriptHost; 43 class InjectedScriptHost;
44 class ScriptValue; 44 class ScriptValue;
45 45
46 class InjectedScriptManager : public NoBaseWillBeGarbageCollectedFinalized<Injec tedScriptManager> { 46 class InjectedScriptManager : public NoBaseWillBeGarbageCollectedFinalized<Injec tedScriptManager> {
47 WTF_MAKE_NONCOPYABLE(InjectedScriptManager); 47 WTF_MAKE_NONCOPYABLE(InjectedScriptManager);
48 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 48 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
49 public: 49 public:
50 struct CallbackData { 50 struct CallbackData {
51 ScopedPersistent<v8::Object> handle; 51 ScopedPersistent<v8::Object> handle;
52 RefPtrWillBePersistent<InjectedScriptHost> host; 52 #if ENABLE(OILPAN)
53 WrapperPersistent<InjectedScriptHost>* hostPtr;
54 #else
55 RefPtr<InjectedScriptHost> host;
56 #endif
53 InjectedScriptManager* injectedScriptManager; 57 InjectedScriptManager* injectedScriptManager;
58
59 #if ENABLE(OILPAN)
60 CallbackData() : hostPtr(0) { }
61 ~CallbackData();
62 #endif
54 }; 63 };
55 64
56 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForPage(); 65 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForPage();
57 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForWorker(); 66 static PassOwnPtrWillBeRawPtr<InjectedScriptManager> createForWorker();
58 ~InjectedScriptManager(); 67 ~InjectedScriptManager();
59 void trace(Visitor*); 68 void trace(Visitor*);
60 69
61 void disconnect(); 70 void disconnect();
62 71
63 InjectedScriptHost* injectedScriptHost(); 72 InjectedScriptHost* injectedScriptHost();
(...skipping 28 matching lines...) Expand all
92 RefPtrWillBeMember<InjectedScriptHost> m_injectedScriptHost; 101 RefPtrWillBeMember<InjectedScriptHost> m_injectedScriptHost;
93 InspectedStateAccessCheck m_inspectedStateAccessCheck; 102 InspectedStateAccessCheck m_inspectedStateAccessCheck;
94 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId; 103 typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId;
95 ScriptStateToId m_scriptStateToId; 104 ScriptStateToId m_scriptStateToId;
96 HashSet<OwnPtr<CallbackData> > m_callbackDataSet; 105 HashSet<OwnPtr<CallbackData> > m_callbackDataSet;
97 }; 106 };
98 107
99 } // namespace blink 108 } // namespace blink
100 109
101 #endif // !defined(InjectedScriptManager_h) 110 #endif // !defined(InjectedScriptManager_h)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.cpp ('k') | Source/core/inspector/InjectedScriptManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698