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])); |
} |