diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 15:26:49 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-28 15:26:49 +0000 |
commit | f2eec2ece4d15d682bae05faf4fb3c24db1c8972 (patch) | |
tree | da790c65c981a05ac675e7a32f29d60e2be97094 /gin/per_context_data.cc | |
parent | 6d095a8b8d4fef7121eca28736b61d115eaca24f (diff) | |
download | chromium_src-f2eec2ece4d15d682bae05faf4fb3c24db1c8972.zip chromium_src-f2eec2ece4d15d682bae05faf4fb3c24db1c8972.tar.gz chromium_src-f2eec2ece4d15d682bae05faf4fb3c24db1c8972.tar.bz2 |
Nukes ContextSupplement and makes PerContextData extend SupportUserData
This gives the same functionality and ownership model while making it
simpler to associate arbitrary data with a context.
BUG=none
TEST=none
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/183433002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254126 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gin/per_context_data.cc')
-rw-r--r-- | gin/per_context_data.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/gin/per_context_data.cc b/gin/per_context_data.cc index 5fedf52..3960528 100644 --- a/gin/per_context_data.cc +++ b/gin/per_context_data.cc @@ -10,12 +10,6 @@ namespace gin { -ContextSupplement::ContextSupplement() { -} - -ContextSupplement::~ContextSupplement() { -} - PerContextData::PerContextData(v8::Handle<v8::Context> context) : runner_(NULL) { context->SetAlignedPointerInEmbedderData( @@ -23,21 +17,6 @@ PerContextData::PerContextData(v8::Handle<v8::Context> context) } PerContextData::~PerContextData() { - DCHECK(supplements_.empty()); -} - -void PerContextData::Detach(v8::Handle<v8::Context> context) { - DCHECK(From(context) == this); - context->SetAlignedPointerInEmbedderData( - kPerContextDataStartIndex + kEmbedderNativeGin, NULL); - - SuplementVector supplements; - supplements.swap(supplements_); - - for (SuplementVector::iterator it = supplements.begin(); - it != supplements.end(); ++it) { - (*it)->Detach(context); - } } // static @@ -46,8 +25,4 @@ PerContextData* PerContextData::From(v8::Handle<v8::Context> context) { context->GetAlignedPointerFromEmbedderData(kEncodedValueIndex)); } -void PerContextData::AddSupplement(scoped_ptr<ContextSupplement> supplement) { - supplements_.push_back(supplement.release()); -} - } // namespace gin |