Commit f81590a1 authored by rdevlin.cronin's avatar rdevlin.cronin Committed by Commit bot

Remove unnecessary v8:: prefixes in include/v8.h

Remove a bunch of unnecessary v8:: prefixes in include/v8.h.
Some are still necessary for disambiguation purposes (e.g., between
bool Value() and v8::Value, or between v8::Isolate and
v8::internal::Isolate), but many aren't.

BUG=None

Review-Url: https://codereview.chromium.org/2605103003
Cr-Commit-Position: refs/heads/master@{#42071}
parent 81dc09fb
...@@ -2238,7 +2238,7 @@ class V8_EXPORT Value : public Data { ...@@ -2238,7 +2238,7 @@ class V8_EXPORT Value : public Data {
template <class T> V8_INLINE static Value* Cast(T* value); template <class T> V8_INLINE static Value* Cast(T* value);
Local<String> TypeOf(v8::Isolate*); Local<String> TypeOf(Isolate*);
private: private:
V8_INLINE bool QuickIsUndefined() const; V8_INLINE bool QuickIsUndefined() const;
...@@ -2285,9 +2285,10 @@ class V8_EXPORT Name : public Primitive { ...@@ -2285,9 +2285,10 @@ class V8_EXPORT Name : public Primitive {
*/ */
int GetIdentityHash(); int GetIdentityHash();
V8_INLINE static Name* Cast(v8::Value* obj); V8_INLINE static Name* Cast(Value* obj);
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(Value* obj);
}; };
...@@ -2385,7 +2386,7 @@ class V8_EXPORT String : public Name { ...@@ -2385,7 +2386,7 @@ class V8_EXPORT String : public Name {
/** /**
* A zero length string. * A zero length string.
*/ */
V8_INLINE static v8::Local<v8::String> Empty(Isolate* isolate); V8_INLINE static Local<String> Empty(Isolate* isolate);
/** /**
* Returns true if the string is external * Returns true if the string is external
...@@ -2419,7 +2420,7 @@ class V8_EXPORT String : public Name { ...@@ -2419,7 +2420,7 @@ class V8_EXPORT String : public Name {
void operator=(const ExternalStringResourceBase&) = delete; void operator=(const ExternalStringResourceBase&) = delete;
private: private:
friend class v8::internal::Heap; friend class internal::Heap;
}; };
/** /**
...@@ -2690,11 +2691,11 @@ class V8_EXPORT Symbol : public Name { ...@@ -2690,11 +2691,11 @@ class V8_EXPORT Symbol : public Name {
static Local<Symbol> GetToStringTag(Isolate* isolate); static Local<Symbol> GetToStringTag(Isolate* isolate);
static Local<Symbol> GetIsConcatSpreadable(Isolate* isolate); static Local<Symbol> GetIsConcatSpreadable(Isolate* isolate);
V8_INLINE static Symbol* Cast(v8::Value* obj); V8_INLINE static Symbol* Cast(Value* obj);
private: private:
Symbol(); Symbol();
static void CheckCast(v8::Value* obj); static void CheckCast(Value* obj);
}; };
...@@ -4438,7 +4439,7 @@ class V8_EXPORT Date : public Object { ...@@ -4438,7 +4439,7 @@ class V8_EXPORT Date : public Object {
*/ */
double ValueOf() const; double ValueOf() const;
V8_INLINE static Date* Cast(v8::Value* obj); V8_INLINE static Date* Cast(Value* obj);
/** /**
* Notification that the embedder has changed the time zone, * Notification that the embedder has changed the time zone,
...@@ -4455,7 +4456,7 @@ class V8_EXPORT Date : public Object { ...@@ -4455,7 +4456,7 @@ class V8_EXPORT Date : public Object {
static void DateTimeConfigurationChangeNotification(Isolate* isolate); static void DateTimeConfigurationChangeNotification(Isolate* isolate);
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(Value* obj);
}; };
...@@ -4468,10 +4469,10 @@ class V8_EXPORT NumberObject : public Object { ...@@ -4468,10 +4469,10 @@ class V8_EXPORT NumberObject : public Object {
double ValueOf() const; double ValueOf() const;
V8_INLINE static NumberObject* Cast(v8::Value* obj); V8_INLINE static NumberObject* Cast(Value* obj);
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(Value* obj);
}; };
...@@ -4485,10 +4486,10 @@ class V8_EXPORT BooleanObject : public Object { ...@@ -4485,10 +4486,10 @@ class V8_EXPORT BooleanObject : public Object {
bool ValueOf() const; bool ValueOf() const;
V8_INLINE static BooleanObject* Cast(v8::Value* obj); V8_INLINE static BooleanObject* Cast(Value* obj);
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(Value* obj);
}; };
...@@ -4501,10 +4502,10 @@ class V8_EXPORT StringObject : public Object { ...@@ -4501,10 +4502,10 @@ class V8_EXPORT StringObject : public Object {
Local<String> ValueOf() const; Local<String> ValueOf() const;
V8_INLINE static StringObject* Cast(v8::Value* obj); V8_INLINE static StringObject* Cast(Value* obj);
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(Value* obj);
}; };
...@@ -4517,10 +4518,10 @@ class V8_EXPORT SymbolObject : public Object { ...@@ -4517,10 +4518,10 @@ class V8_EXPORT SymbolObject : public Object {
Local<Symbol> ValueOf() const; Local<Symbol> ValueOf() const;
V8_INLINE static SymbolObject* Cast(v8::Value* obj); V8_INLINE static SymbolObject* Cast(Value* obj);
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(Value* obj);
}; };
...@@ -4570,10 +4571,10 @@ class V8_EXPORT RegExp : public Object { ...@@ -4570,10 +4571,10 @@ class V8_EXPORT RegExp : public Object {
*/ */
Flags GetFlags() const; Flags GetFlags() const;
V8_INLINE static RegExp* Cast(v8::Value* obj); V8_INLINE static RegExp* Cast(Value* obj);
private: private:
static void CheckCast(v8::Value* obj); static void CheckCast(Value* obj);
}; };
...@@ -5613,9 +5614,9 @@ class V8_EXPORT Extension { // NOLINT ...@@ -5613,9 +5614,9 @@ class V8_EXPORT Extension { // NOLINT
const char** deps = 0, const char** deps = 0,
int source_length = -1); int source_length = -1);
virtual ~Extension() { } virtual ~Extension() { }
virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate( virtual Local<FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Local<v8::String> name) { Isolate* isolate, Local<String> name) {
return v8::Local<v8::FunctionTemplate>(); return Local<FunctionTemplate>();
} }
const char* name() const { return name_; } const char* name() const { return name_; }
...@@ -7901,7 +7902,7 @@ class V8_EXPORT TryCatch { ...@@ -7901,7 +7902,7 @@ class V8_EXPORT TryCatch {
* UseAfterReturn is enabled, then the address returned will be the address * UseAfterReturn is enabled, then the address returned will be the address
* of the C++ try catch handler itself. * of the C++ try catch handler itself.
*/ */
static void* JSStackComparableAddress(v8::TryCatch* handler) { static void* JSStackComparableAddress(TryCatch* handler) {
if (handler == NULL) return NULL; if (handler == NULL) return NULL;
return handler->js_stack_comparable_address_; return handler->js_stack_comparable_address_;
} }
...@@ -7914,8 +7915,8 @@ class V8_EXPORT TryCatch { ...@@ -7914,8 +7915,8 @@ class V8_EXPORT TryCatch {
private: private:
void ResetInternal(); void ResetInternal();
v8::internal::Isolate* isolate_; internal::Isolate* isolate_;
v8::TryCatch* next_; TryCatch* next_;
void* exception_; void* exception_;
void* message_obj_; void* message_obj_;
void* js_stack_comparable_address_; void* js_stack_comparable_address_;
...@@ -7925,7 +7926,7 @@ class V8_EXPORT TryCatch { ...@@ -7925,7 +7926,7 @@ class V8_EXPORT TryCatch {
bool rethrow_ : 1; bool rethrow_ : 1;
bool has_terminated_ : 1; bool has_terminated_ : 1;
friend class v8::internal::Isolate; friend class internal::Isolate;
}; };
...@@ -8066,7 +8067,7 @@ class V8_EXPORT Context { ...@@ -8066,7 +8067,7 @@ class V8_EXPORT Context {
void Exit(); void Exit();
/** Returns an isolate associated with a current context. */ /** Returns an isolate associated with a current context. */
v8::Isolate* GetIsolate(); Isolate* GetIsolate();
/** /**
* The field at kDebugIdIndex is reserved for V8 debugger implementation. * The field at kDebugIdIndex is reserved for V8 debugger implementation.
...@@ -9009,9 +9010,8 @@ Local<Boolean> Boolean::New(Isolate* isolate, bool value) { ...@@ -9009,9 +9010,8 @@ Local<Boolean> Boolean::New(Isolate* isolate, bool value) {
return value ? True(isolate) : False(isolate); return value ? True(isolate) : False(isolate);
} }
void Template::Set(Isolate* isolate, const char* name, Local<Data> value) {
void Template::Set(Isolate* isolate, const char* name, v8::Local<Data> value) { Set(String::NewFromUtf8(isolate, name, NewStringType::kNormal)
Set(v8::String::NewFromUtf8(isolate, name, NewStringType::kNormal)
.ToLocalChecked(), .ToLocalChecked(),
value); value);
} }
...@@ -9620,7 +9620,7 @@ template<typename T> ...@@ -9620,7 +9620,7 @@ template<typename T>
void Isolate::SetObjectGroupId(const Persistent<T>& object, void Isolate::SetObjectGroupId(const Persistent<T>& object,
UniqueId id) { UniqueId id) {
TYPE_CHECK(Value, T); TYPE_CHECK(Value, T);
SetObjectGroupId(reinterpret_cast<v8::internal::Object**>(object.val_), id); SetObjectGroupId(reinterpret_cast<internal::Object**>(object.val_), id);
} }
...@@ -9628,8 +9628,7 @@ template<typename T> ...@@ -9628,8 +9628,7 @@ template<typename T>
void Isolate::SetReferenceFromGroup(UniqueId id, void Isolate::SetReferenceFromGroup(UniqueId id,
const Persistent<T>& object) { const Persistent<T>& object) {
TYPE_CHECK(Value, T); TYPE_CHECK(Value, T);
SetReferenceFromGroup(id, SetReferenceFromGroup(id, reinterpret_cast<internal::Object**>(object.val_));
reinterpret_cast<v8::internal::Object**>(object.val_));
} }
...@@ -9638,8 +9637,8 @@ void Isolate::SetReference(const Persistent<T>& parent, ...@@ -9638,8 +9637,8 @@ void Isolate::SetReference(const Persistent<T>& parent,
const Persistent<S>& child) { const Persistent<S>& child) {
TYPE_CHECK(Object, T); TYPE_CHECK(Object, T);
TYPE_CHECK(Value, S); TYPE_CHECK(Value, S);
SetReference(reinterpret_cast<v8::internal::Object**>(parent.val_), SetReference(reinterpret_cast<internal::Object**>(parent.val_),
reinterpret_cast<v8::internal::Object**>(child.val_)); reinterpret_cast<internal::Object**>(child.val_));
} }
...@@ -9716,14 +9715,14 @@ void V8::SetFatalErrorHandler(FatalErrorCallback callback) { ...@@ -9716,14 +9715,14 @@ void V8::SetFatalErrorHandler(FatalErrorCallback callback) {
void V8::RemoveGCPrologueCallback(GCCallback callback) { void V8::RemoveGCPrologueCallback(GCCallback callback) {
Isolate* isolate = Isolate::GetCurrent(); Isolate* isolate = Isolate::GetCurrent();
isolate->RemoveGCPrologueCallback( isolate->RemoveGCPrologueCallback(
reinterpret_cast<v8::Isolate::GCCallback>(callback)); reinterpret_cast<Isolate::GCCallback>(callback));
} }
void V8::RemoveGCEpilogueCallback(GCCallback callback) { void V8::RemoveGCEpilogueCallback(GCCallback callback) {
Isolate* isolate = Isolate::GetCurrent(); Isolate* isolate = Isolate::GetCurrent();
isolate->RemoveGCEpilogueCallback( isolate->RemoveGCEpilogueCallback(
reinterpret_cast<v8::Isolate::GCCallback>(callback)); reinterpret_cast<Isolate::GCCallback>(callback));
} }
void V8::TerminateExecution(Isolate* isolate) { isolate->TerminateExecution(); } void V8::TerminateExecution(Isolate* isolate) { isolate->TerminateExecution(); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment