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 {
template <class T> V8_INLINE static Value* Cast(T* value);
Local<String> TypeOf(v8::Isolate*);
Local<String> TypeOf(Isolate*);
private:
V8_INLINE bool QuickIsUndefined() const;
......@@ -2285,9 +2285,10 @@ class V8_EXPORT Name : public Primitive {
*/
int GetIdentityHash();
V8_INLINE static Name* Cast(v8::Value* obj);
V8_INLINE static Name* Cast(Value* obj);
private:
static void CheckCast(v8::Value* obj);
static void CheckCast(Value* obj);
};
......@@ -2385,7 +2386,7 @@ class V8_EXPORT String : public Name {
/**
* 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
......@@ -2419,7 +2420,7 @@ class V8_EXPORT String : public Name {
void operator=(const ExternalStringResourceBase&) = delete;
private:
friend class v8::internal::Heap;
friend class internal::Heap;
};
/**
......@@ -2690,11 +2691,11 @@ class V8_EXPORT Symbol : public Name {
static Local<Symbol> GetToStringTag(Isolate* isolate);
static Local<Symbol> GetIsConcatSpreadable(Isolate* isolate);
V8_INLINE static Symbol* Cast(v8::Value* obj);
V8_INLINE static Symbol* Cast(Value* obj);
private:
Symbol();
static void CheckCast(v8::Value* obj);
static void CheckCast(Value* obj);
};
......@@ -4438,7 +4439,7 @@ class V8_EXPORT Date : public Object {
*/
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,
......@@ -4455,7 +4456,7 @@ class V8_EXPORT Date : public Object {
static void DateTimeConfigurationChangeNotification(Isolate* isolate);
private:
static void CheckCast(v8::Value* obj);
static void CheckCast(Value* obj);
};
......@@ -4468,10 +4469,10 @@ class V8_EXPORT NumberObject : public Object {
double ValueOf() const;
V8_INLINE static NumberObject* Cast(v8::Value* obj);
V8_INLINE static NumberObject* Cast(Value* obj);
private:
static void CheckCast(v8::Value* obj);
static void CheckCast(Value* obj);
};
......@@ -4485,10 +4486,10 @@ class V8_EXPORT BooleanObject : public Object {
bool ValueOf() const;
V8_INLINE static BooleanObject* Cast(v8::Value* obj);
V8_INLINE static BooleanObject* Cast(Value* obj);
private:
static void CheckCast(v8::Value* obj);
static void CheckCast(Value* obj);
};
......@@ -4501,10 +4502,10 @@ class V8_EXPORT StringObject : public Object {
Local<String> ValueOf() const;
V8_INLINE static StringObject* Cast(v8::Value* obj);
V8_INLINE static StringObject* Cast(Value* obj);
private:
static void CheckCast(v8::Value* obj);
static void CheckCast(Value* obj);
};
......@@ -4517,10 +4518,10 @@ class V8_EXPORT SymbolObject : public Object {
Local<Symbol> ValueOf() const;
V8_INLINE static SymbolObject* Cast(v8::Value* obj);
V8_INLINE static SymbolObject* Cast(Value* obj);
private:
static void CheckCast(v8::Value* obj);
static void CheckCast(Value* obj);
};
......@@ -4570,10 +4571,10 @@ class V8_EXPORT RegExp : public Object {
*/
Flags GetFlags() const;
V8_INLINE static RegExp* Cast(v8::Value* obj);
V8_INLINE static RegExp* Cast(Value* obj);
private:
static void CheckCast(v8::Value* obj);
static void CheckCast(Value* obj);
};
......@@ -5613,9 +5614,9 @@ class V8_EXPORT Extension { // NOLINT
const char** deps = 0,
int source_length = -1);
virtual ~Extension() { }
virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Local<v8::String> name) {
return v8::Local<v8::FunctionTemplate>();
virtual Local<FunctionTemplate> GetNativeFunctionTemplate(
Isolate* isolate, Local<String> name) {
return Local<FunctionTemplate>();
}
const char* name() const { return name_; }
......@@ -7901,7 +7902,7 @@ class V8_EXPORT TryCatch {
* UseAfterReturn is enabled, then the address returned will be the address
* of the C++ try catch handler itself.
*/
static void* JSStackComparableAddress(v8::TryCatch* handler) {
static void* JSStackComparableAddress(TryCatch* handler) {
if (handler == NULL) return NULL;
return handler->js_stack_comparable_address_;
}
......@@ -7914,8 +7915,8 @@ class V8_EXPORT TryCatch {
private:
void ResetInternal();
v8::internal::Isolate* isolate_;
v8::TryCatch* next_;
internal::Isolate* isolate_;
TryCatch* next_;
void* exception_;
void* message_obj_;
void* js_stack_comparable_address_;
......@@ -7925,7 +7926,7 @@ class V8_EXPORT TryCatch {
bool rethrow_ : 1;
bool has_terminated_ : 1;
friend class v8::internal::Isolate;
friend class internal::Isolate;
};
......@@ -8066,7 +8067,7 @@ class V8_EXPORT Context {
void Exit();
/** Returns an isolate associated with a current context. */
v8::Isolate* GetIsolate();
Isolate* GetIsolate();
/**
* The field at kDebugIdIndex is reserved for V8 debugger implementation.
......@@ -9009,9 +9010,8 @@ Local<Boolean> Boolean::New(Isolate* isolate, bool value) {
return value ? True(isolate) : False(isolate);
}
void Template::Set(Isolate* isolate, const char* name, v8::Local<Data> value) {
Set(v8::String::NewFromUtf8(isolate, name, NewStringType::kNormal)
void Template::Set(Isolate* isolate, const char* name, Local<Data> value) {
Set(String::NewFromUtf8(isolate, name, NewStringType::kNormal)
.ToLocalChecked(),
value);
}
......@@ -9620,7 +9620,7 @@ template<typename T>
void Isolate::SetObjectGroupId(const Persistent<T>& object,
UniqueId id) {
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>
void Isolate::SetReferenceFromGroup(UniqueId id,
const Persistent<T>& object) {
TYPE_CHECK(Value, T);
SetReferenceFromGroup(id,
reinterpret_cast<v8::internal::Object**>(object.val_));
SetReferenceFromGroup(id, reinterpret_cast<internal::Object**>(object.val_));
}
......@@ -9638,8 +9637,8 @@ void Isolate::SetReference(const Persistent<T>& parent,
const Persistent<S>& child) {
TYPE_CHECK(Object, T);
TYPE_CHECK(Value, S);
SetReference(reinterpret_cast<v8::internal::Object**>(parent.val_),
reinterpret_cast<v8::internal::Object**>(child.val_));
SetReference(reinterpret_cast<internal::Object**>(parent.val_),
reinterpret_cast<internal::Object**>(child.val_));
}
......@@ -9716,14 +9715,14 @@ void V8::SetFatalErrorHandler(FatalErrorCallback callback) {
void V8::RemoveGCPrologueCallback(GCCallback callback) {
Isolate* isolate = Isolate::GetCurrent();
isolate->RemoveGCPrologueCallback(
reinterpret_cast<v8::Isolate::GCCallback>(callback));
reinterpret_cast<Isolate::GCCallback>(callback));
}
void V8::RemoveGCEpilogueCallback(GCCallback callback) {
Isolate* isolate = Isolate::GetCurrent();
isolate->RemoveGCEpilogueCallback(
reinterpret_cast<v8::Isolate::GCCallback>(callback));
reinterpret_cast<Isolate::GCCallback>(callback));
}
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