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

Unified Diff: src/d8.cc

Issue 77913003: Make it possible to add more than one piece of embedder data to isolates (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 339cc327bd9bbf3f9d8c7c1f63e97fb4944c058d..9dd8e9171d16f3ae39554ddeb8bfef53eacca5b7 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -92,15 +92,15 @@ class PerIsolateData {
public:
explicit PerIsolateData(Isolate* isolate) : isolate_(isolate), realms_(NULL) {
HandleScope scope(isolate);
- isolate->SetData(this);
+ isolate->SetData(0, this);
}
~PerIsolateData() {
- isolate_->SetData(NULL); // Not really needed, just to be sure...
+ isolate_->SetData(0, NULL); // Not really needed, just to be sure...
}
inline static PerIsolateData* Get(Isolate* isolate) {
- return reinterpret_cast<PerIsolateData*>(isolate->GetData());
+ return reinterpret_cast<PerIsolateData*>(isolate->GetData(0));
}
class RealmScope {

Powered by Google App Engine
This is Rietveld 408576698