summaryrefslogtreecommitdiffstats
path: root/gin/per_context_data.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-06 01:51:17 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-06 01:51:17 +0000
commit36e3740818c9e7312dd62ad4c0131c2a54d95d8e (patch)
tree1c05dbb53edaa6794a7cc4ad6036d8a22b209865 /gin/per_context_data.cc
parent0c142a64d093558991899ce1fadff5baf19b8c95 (diff)
downloadchromium_src-36e3740818c9e7312dd62ad4c0131c2a54d95d8e.zip
chromium_src-36e3740818c9e7312dd62ad4c0131c2a54d95d8e.tar.gz
chromium_src-36e3740818c9e7312dd62ad4c0131c2a54d95d8e.tar.bz2
[gin] move context_holder to public/
Also, define names for the embedder data slots on v8::Context that gin embedders should use. BUG=321631 R=abarth@chromium.org Review URL: https://codereview.chromium.org/104593007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gin/per_context_data.cc')
-rw-r--r--gin/per_context_data.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gin/per_context_data.cc b/gin/per_context_data.cc
index 666c414..5183d00 100644
--- a/gin/per_context_data.cc
+++ b/gin/per_context_data.cc
@@ -5,6 +5,7 @@
#include "gin/per_context_data.h"
#include "base/logging.h"
+#include "gin/public/context_holder.h"
#include "gin/public/wrapper_info.h"
namespace gin {
@@ -17,7 +18,8 @@ ContextSupplement::~ContextSupplement() {
PerContextData::PerContextData(v8::Handle<v8::Context> context)
: runner_(NULL) {
- context->SetAlignedPointerInEmbedderData(kEncodedValueIndex, this);
+ context->SetAlignedPointerInEmbedderData(
+ kPerContextDataStartIndex + kEmbedderNativeGin, this);
}
PerContextData::~PerContextData() {
@@ -26,7 +28,8 @@ PerContextData::~PerContextData() {
void PerContextData::Detach(v8::Handle<v8::Context> context) {
DCHECK(From(context) == this);
- context->SetAlignedPointerInEmbedderData(kEncodedValueIndex, NULL);
+ context->SetAlignedPointerInEmbedderData(
+ kPerContextDataStartIndex + kEmbedderNativeGin, NULL);
SuplementVector supplements;
supplements.swap(supplements_);