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

Unified Diff: include/v8.h

Issue 85693002: Add versions with an Isolate parameter for inlined API methods that need one (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
« no previous file with comments | « no previous file | src/debug.cc » ('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 6e1ac3f5d1e828b0104cafff000e035964887e89..7f377c318e96ddea2a081182e5df45d6b73ca280 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1524,6 +1524,8 @@ class V8_EXPORT Primitive : public Value { };
class V8_EXPORT Boolean : public Primitive {
public:
bool Value() const;
+ V8_INLINE static Handle<Boolean> New(Isolate* isolate, bool value);
+ // Will be deprecated soon.
V8_INLINE static Handle<Boolean> New(bool value);
};
@@ -3094,6 +3096,8 @@ class V8_EXPORT Template : public Data {
/** Adds a property to each instance created by this template.*/
void Set(Handle<String> name, Handle<Data> value,
PropertyAttribute attributes = None);
+ V8_INLINE void Set(Isolate* isolate, const char* name, Handle<Data> value);
+ // Will be deprecated soon.
V8_INLINE void Set(const char* name, Handle<Data> value);
void SetAccessorProperty(
@@ -6031,14 +6035,23 @@ Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const {
}
-Handle<Boolean> Boolean::New(bool value) {
- Isolate* isolate = Isolate::GetCurrent();
+Handle<Boolean> Boolean::New(Isolate* isolate, bool value) {
return value ? True(isolate) : False(isolate);
}
+Handle<Boolean> Boolean::New(bool value) {
+ return Boolean::New(Isolate::GetCurrent(), value);
+}
+
+
+void Template::Set(Isolate* isolate, const char* name, v8::Handle<Data> value) {
+ Set(v8::String::NewFromUtf8(isolate, name), value);
+}
+
+
void Template::Set(const char* name, v8::Handle<Data> value) {
- Set(v8::String::NewFromUtf8(Isolate::GetCurrent(), name), value);
+ Set(Isolate::GetCurrent(), name, value);
}
« no previous file with comments | « no previous file | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698