Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp b/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp |
| index fe1e2109876e1a32ed618ffe409fb4c65694ac2f..088db3b2fe14cd47caec48ffaa62f761c20bbaa7 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp |
| @@ -13,11 +13,13 @@ namespace blink { |
| namespace { |
| -using ActiveScriptWrappableSetType = HashSet<const ActiveScriptWrappable*>; |
| +using ActiveScriptWrappableSetType = PersistentHeapHashSet<WeakMember<const ActiveScriptWrappable>>; |
| ActiveScriptWrappableSetType& activeScriptWrappables() |
| { |
| DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<ActiveScriptWrappableSetType>, activeScriptWrappableSet, new ThreadSpecific<ActiveScriptWrappableSetType>()); |
|
haraken
2016/05/10 07:10:27
Not directly related to this CL, shall we move the
sof
2016/05/10 15:46:04
That would avoid ThreadSpecific<> , which would be
|
| + if (!activeScriptWrappableSet.isSet()) |
| + activeScriptWrappableSet->registerAsStaticReference(); |
| return *activeScriptWrappableSet; |
| } |
| @@ -29,11 +31,6 @@ ActiveScriptWrappable::ActiveScriptWrappable(ScriptWrappable* self) |
| activeScriptWrappables().add(this); |
| } |
| -ActiveScriptWrappable::~ActiveScriptWrappable() |
| -{ |
| - activeScriptWrappables().remove(this); |
| -} |
| - |
| ScriptWrappable* ActiveScriptWrappable::toScriptWrappable() const |
| { |
| return m_scriptWrappable; |