diff options
author | mlamouri <mlamouri@chromium.org> | 2015-04-14 08:22:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-14 15:23:05 +0000 |
commit | 60a2857d182a7d980a7d43c9213cc1d96bf25f9e (patch) | |
tree | 722e7db3c14e68ce8b2cf253a112651c31427641 /extensions/renderer/module_system.h | |
parent | 27e68f6e248a872f482ebe35f8abd80c5a60aa4d (diff) | |
download | chromium_src-60a2857d182a7d980a7d43c9213cc1d96bf25f9e.zip chromium_src-60a2857d182a7d980a7d43c9213cc1d96bf25f9e.tar.gz chromium_src-60a2857d182a7d980a7d43c9213cc1d96bf25f9e.tar.bz2 |
Revert of Move the event attach/detach logic on unload from event.js to (patchset #7 id:130001 of https://codereview.chromium.org/1074273002/)
Reason for revert:
This is breaking ExtensionApiTest.EventsAreUnregistered on Win7 Dedubg bots.
See:
https://build.chromium.org/p/chromium.webkit/builders/Win7%20%28dbg%29/builds/16162
Original issue's description:
> Move the event attach/detach logic on unload from event.js to
> event_bindings.cc.
>
> This removes one of the reasons to call into JavaScript on context unload,
> which can crash. It's also more robust; it's confusing trying to maintain a
> data structure in JavaScript which reflects C++ state, which contributes to
> bugs like crbug.com/474718.
>
> Also clean up and formalise the script context invalidation system: CHECK
> rather than guarding against multiple invalidations, only invalidate script
> context related member variables, add an invalidation observer interface.
>
> BUG=474718, 475536
> R=rdevlin.cronin@chromium.org
>
> Committed: https://crrev.com/d99095034d2e88897ae82c8353f3327a3a1d03a5
> Cr-Commit-Position: refs/heads/master@{#324933}
TBR=rdevlin.cronin@chromium.org,kalman@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=474718, 475536
Review URL: https://codereview.chromium.org/1083663004
Cr-Commit-Position: refs/heads/master@{#325050}
Diffstat (limited to 'extensions/renderer/module_system.h')
-rw-r--r-- | extensions/renderer/module_system.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/extensions/renderer/module_system.h b/extensions/renderer/module_system.h index ad89524..8b4a35c 100644 --- a/extensions/renderer/module_system.h +++ b/extensions/renderer/module_system.h @@ -142,7 +142,6 @@ class ModuleSystem : public ObjectBackedNativeHandler, } protected: - friend class ModuleSystemTestEnvironment; friend class ScriptContext; void Invalidate() override; @@ -206,10 +205,6 @@ class ModuleSystem : public ObjectBackedNativeHandler, const std::string& id, const std::vector<std::string>& dependencies) override; - // Marks any existing NativeHandler named |name| as clobbered. - // See |clobbered_native_handlers_|. - void ClobberExistingNativeHandler(const std::string& name); - ScriptContext* context_; // A map from module names to the JS source for that module. GetSource() @@ -227,16 +222,8 @@ class ModuleSystem : public ObjectBackedNativeHandler, // tests. scoped_ptr<ExceptionHandler> exception_handler_; - // A set of native handlers that should actually be require()d as non-native - // handlers. This is used for tests to mock out native handlers in JS. std::set<std::string> overridden_native_handlers_; - // A list of NativeHandlers that have been clobbered, either due to - // registering a NativeHandler when one was already registered with the same - // name, or due to OverrideNativeHandlerForTest. This is needed so that they - // can be later Invalidated. It should only happen in tests. - std::vector<linked_ptr<NativeHandler>> clobbered_native_handlers_; - base::WeakPtrFactory<ModuleSystem> weak_factory_; DISALLOW_COPY_AND_ASSIGN(ModuleSystem); |