| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 3f5a0793b21a5e53d68070494f18e28d79c57cf2..1ae81b13252e3a1bdf50cb53b66433dd49b053f3 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -398,7 +398,7 @@ enum CompressedStartupDataItems {
|
| kSnapshotContext,
|
| kLibraries,
|
| kExperimentalLibraries,
|
| -#if defined(ENABLE_I18N_SUPPORT)
|
| +#if defined(V8_I18N_SUPPORT)
|
| kI18NExtension,
|
| #endif
|
| kCompressedStartupDataCount
|
| @@ -442,7 +442,7 @@ void V8::GetCompressedStartupData(StartupData* compressed_data) {
|
| compressed_data[kExperimentalLibraries].raw_size =
|
| i::ExperimentalNatives::GetRawScriptsSize();
|
|
|
| -#if defined(ENABLE_I18N_SUPPORT)
|
| +#if defined(V8_I18N_SUPPORT)
|
| i::Vector<const ii:byte> i18n_extension_source =
|
| i::I18NNatives::GetScriptsSource();
|
| compressed_data[kI18NExtension].data =
|
| @@ -482,7 +482,7 @@ void V8::SetDecompressedStartupData(StartupData* decompressed_data) {
|
| decompressed_data[kExperimentalLibraries].raw_size);
|
| i::ExperimentalNatives::SetRawScriptsSource(exp_libraries_source);
|
|
|
| -#if defined(ENABLE_I18N_SUPPORT)
|
| +#if defined(V8_I18N_SUPPORT)
|
| ASSERT_EQ(i::I18NNatives::GetRawScriptsSize(),
|
| decompressed_data[kI18NExtension].raw_size);
|
| i::Vector<const char> i18n_extension_source(
|
| @@ -770,6 +770,7 @@ void Context::Exit() {
|
| i::Context* last_context =
|
| isolate->handle_scope_implementer()->RestoreContext();
|
| isolate->set_context(last_context);
|
| + isolate->set_context_exit_happened(true);
|
| }
|
|
|
|
|
| @@ -1917,6 +1918,7 @@ Local<Script> Script::New(v8::Handle<String> source,
|
| i::Handle<i::Object> name_obj;
|
| int line_offset = 0;
|
| int column_offset = 0;
|
| + bool is_shared_cross_origin = false;
|
| if (origin != NULL) {
|
| if (!origin->ResourceName().IsEmpty()) {
|
| name_obj = Utils::OpenHandle(*origin->ResourceName());
|
| @@ -1928,6 +1930,10 @@ Local<Script> Script::New(v8::Handle<String> source,
|
| column_offset =
|
| static_cast<int>(origin->ResourceColumnOffset()->Value());
|
| }
|
| + if (!origin->ResourceIsSharedCrossOrigin().IsEmpty()) {
|
| + is_shared_cross_origin =
|
| + origin->ResourceIsSharedCrossOrigin() == v8::True();
|
| + }
|
| }
|
| EXCEPTION_PREAMBLE(isolate);
|
| i::ScriptDataImpl* pre_data_impl =
|
| @@ -1944,6 +1950,7 @@ Local<Script> Script::New(v8::Handle<String> source,
|
| name_obj,
|
| line_offset,
|
| column_offset,
|
| + is_shared_cross_origin,
|
| isolate->global_context(),
|
| NULL,
|
| pre_data_impl,
|
| @@ -2411,6 +2418,20 @@ int Message::GetEndColumn() const {
|
| }
|
|
|
|
|
| +bool Message::IsSharedCrossOrigin() const {
|
| + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| + if (IsDeadCheck(isolate, "v8::Message::IsSharedCrossOrigin()")) return 0;
|
| + ENTER_V8(isolate);
|
| + i::HandleScope scope(isolate);
|
| + i::Handle<i::JSMessageObject> message =
|
| + i::Handle<i::JSMessageObject>::cast(Utils::OpenHandle(this));
|
| + i::Handle<i::JSValue> script =
|
| + i::Handle<i::JSValue>::cast(i::Handle<i::Object>(message->script(),
|
| + isolate));
|
| + return i::Script::cast(script->value())->is_shared_cross_origin();
|
| +}
|
| +
|
| +
|
| Local<String> Message::GetSourceLine() const {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| ON_BAILOUT(isolate, "v8::Message::GetSourceLine()", return Local<String>());
|
| @@ -6083,7 +6104,7 @@ Local<v8::Value> v8::NumberObject::New(double value) {
|
| }
|
|
|
|
|
| -double v8::NumberObject::NumberValue() const {
|
| +double v8::NumberObject::ValueOf() const {
|
| i::Isolate* isolate = i::Isolate::Current();
|
| if (IsDeadCheck(isolate, "v8::NumberObject::NumberValue()")) return 0;
|
| LOG_API(isolate, "NumberObject::NumberValue");
|
| @@ -6107,7 +6128,7 @@ Local<v8::Value> v8::BooleanObject::New(bool value) {
|
| }
|
|
|
|
|
| -bool v8::BooleanObject::BooleanValue() const {
|
| +bool v8::BooleanObject::ValueOf() const {
|
| i::Isolate* isolate = i::Isolate::Current();
|
| if (IsDeadCheck(isolate, "v8::BooleanObject::BooleanValue()")) return 0;
|
| LOG_API(isolate, "BooleanObject::BooleanValue");
|
| @@ -6128,7 +6149,7 @@ Local<v8::Value> v8::StringObject::New(Handle<String> value) {
|
| }
|
|
|
|
|
| -Local<v8::String> v8::StringObject::StringValue() const {
|
| +Local<v8::String> v8::StringObject::ValueOf() const {
|
| i::Isolate* isolate = i::Isolate::Current();
|
| if (IsDeadCheck(isolate, "v8::StringObject::StringValue()")) {
|
| return Local<v8::String>();
|
| @@ -6152,7 +6173,7 @@ Local<v8::Value> v8::SymbolObject::New(Isolate* isolate, Handle<Symbol> value) {
|
| }
|
|
|
|
|
| -Local<v8::Symbol> v8::SymbolObject::SymbolValue() const {
|
| +Local<v8::Symbol> v8::SymbolObject::ValueOf() const {
|
| i::Isolate* isolate = i::Isolate::Current();
|
| if (IsDeadCheck(isolate, "v8::SymbolObject::SymbolValue()"))
|
| return Local<v8::Symbol>();
|
| @@ -6181,7 +6202,7 @@ Local<v8::Value> v8::Date::New(double time) {
|
| }
|
|
|
|
|
| -double v8::Date::NumberValue() const {
|
| +double v8::Date::ValueOf() const {
|
| i::Isolate* isolate = i::Isolate::Current();
|
| if (IsDeadCheck(isolate, "v8::Date::NumberValue()")) return 0;
|
| LOG_API(isolate, "Date::NumberValue");
|
|
|