From: rossberg@chromium.org Date: Fri, 17 Aug 2012 09:03:08 +0000 (+0000) Subject: Rename "global context" to "native context", X-Git-Tag: upstream/4.7.83~16137 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42552808ab0019ce15a96f51608ceb5b6e0d0f28;p=platform%2Fupstream%2Fv8.git Rename "global context" to "native context", in anticipation of the upcoming lexical global scope. Mostly automatised as: for FILE in `egrep -ril "global[ _]?context" src test/cctest` do echo $FILE sed "s/Global context/Native context/g" <$FILE >$FILE.0 sed "s/global context/native context/g" <$FILE.0 >$FILE.1 sed "s/global_context/native_context/g" <$FILE.1 >$FILE.2 sed "s/GLOBAL_CONTEXT/NATIVE_CONTEXT/g" <$FILE.2 >$FILE.3 sed "s/GlobalContext/NativeContext/g" <$FILE.3 >$FILE rm $FILE.[0-9] done R=mstarzinger@chromium.org BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10832342 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/accessors.cc b/src/accessors.cc index b947399a4..d4f04e174 100644 --- a/src/accessors.cc +++ b/src/accessors.cc @@ -92,9 +92,9 @@ MaybeObject* Accessors::ArrayGetLength(Object* object, void*) { Object* Accessors::FlattenNumber(Object* value) { if (value->IsNumber() || !value->IsJSValue()) return value; JSValue* wrapper = JSValue::cast(value); - ASSERT(Isolate::Current()->context()->global_context()->number_function()-> + ASSERT(Isolate::Current()->context()->native_context()->number_function()-> has_initial_map()); - Map* number_map = Isolate::Current()->context()->global_context()-> + Map* number_map = Isolate::Current()->context()->native_context()-> number_function()->initial_map(); if (wrapper->map() == number_map) return wrapper->value(); return value; diff --git a/src/api.cc b/src/api.cc index f152175e0..4c69eb7b0 100644 --- a/src/api.cc +++ b/src/api.cc @@ -768,8 +768,8 @@ void Context::SetData(v8::Handle data) { i::Isolate* isolate = env->GetIsolate(); if (IsDeadCheck(isolate, "v8::Context::SetData()")) return; i::Handle raw_data = Utils::OpenHandle(*data); - ASSERT(env->IsGlobalContext()); - if (env->IsGlobalContext()) { + ASSERT(env->IsNativeContext()); + if (env->IsNativeContext()) { env->set_data(*raw_data); } } @@ -782,8 +782,8 @@ v8::Local Context::GetData() { return v8::Local(); } i::Object* raw_result = NULL; - ASSERT(env->IsGlobalContext()); - if (env->IsGlobalContext()) { + ASSERT(env->IsNativeContext()); + if (env->IsNativeContext()) { raw_result = env->data(); } else { return Local(); @@ -1575,7 +1575,7 @@ Local