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

Unified Diff: include/v8.h

Issue 10069050: Add isolate accessor to AccessorInfo and Arguments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment by Daniel Clifford. Created 8 years, 8 months 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
« no previous file with comments | « no previous file | src/apiutils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index e360f7e688fbf11ff96fb563bb95bd73a258394a..0752430a9f8db1af037ce8d70ce8943a39596df8 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1,4 +1,4 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -107,6 +107,7 @@ class Data;
class AccessorInfo;
class StackTrace;
class StackFrame;
+class Isolate;
namespace internal {
@@ -1967,10 +1968,12 @@ class Arguments {
inline Local<Object> Holder() const;
inline bool IsConstructCall() const;
inline Local<Value> Data() const;
+ inline Isolate* GetIsolate() const;
private:
- static const int kDataIndex = 0;
- static const int kCalleeIndex = -1;
- static const int kHolderIndex = -2;
+ static const int kIsolateIndex = 0;
+ static const int kDataIndex = -1;
+ static const int kCalleeIndex = -2;
+ static const int kHolderIndex = -3;
friend class ImplementationUtilities;
inline Arguments(internal::Object** implicit_args,
@@ -1992,6 +1995,7 @@ class V8EXPORT AccessorInfo {
public:
inline AccessorInfo(internal::Object** args)
: args_(args) { }
+ inline Isolate* GetIsolate() const;
inline Local<Value> Data() const;
inline Local<Object> This() const;
inline Local<Object> Holder() const;
@@ -4048,6 +4052,11 @@ Local<Value> Arguments::Data() const {
}
+Isolate* Arguments::GetIsolate() const {
+ return *reinterpret_cast<Isolate**>(&implicit_args_[kIsolateIndex]);
+}
+
+
bool Arguments::IsConstructCall() const {
return is_construct_call_;
}
@@ -4283,6 +4292,11 @@ External* External::Cast(v8::Value* value) {
}
+Isolate* AccessorInfo::GetIsolate() const {
+ return *reinterpret_cast<Isolate**>(&args_[-3]);
+}
+
+
Local<Value> AccessorInfo::Data() const {
return Local<Value>(reinterpret_cast<Value*>(&args_[-2]));
}
« no previous file with comments | « no previous file | src/apiutils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698