| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index d587b81fd3461202a807bcdd0b68ab7f25f6d5a4..d532a1f2fd8a01e2d1ef5e82295d5263017b7229 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -1918,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());
|
| @@ -1929,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 =
|
| @@ -1945,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,
|
| @@ -2412,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>());
|
|
|