Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: src/api.cc

Issue 68213002: api: set ScriptOrigin::ResourceIsSharedCrossOrigin()
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4131 matching lines...) Expand 10 before | Expand all | Expand 10 after
4142 4142
4143 4143
4144 ScriptOrigin Function::GetScriptOrigin() const { 4144 ScriptOrigin Function::GetScriptOrigin() const {
4145 i::Handle<i::JSFunction> func = Utils::OpenHandle(this); 4145 i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
4146 if (func->shared()->script()->IsScript()) { 4146 if (func->shared()->script()->IsScript()) {
4147 i::Handle<i::Script> script(i::Script::cast(func->shared()->script())); 4147 i::Handle<i::Script> script(i::Script::cast(func->shared()->script()));
4148 i::Handle<i::Object> scriptName = GetScriptNameOrSourceURL(script); 4148 i::Handle<i::Object> scriptName = GetScriptNameOrSourceURL(script);
4149 v8::ScriptOrigin origin( 4149 v8::ScriptOrigin origin(
4150 Utils::ToLocal(scriptName), 4150 Utils::ToLocal(scriptName),
4151 v8::Integer::New(script->line_offset()->value()), 4151 v8::Integer::New(script->line_offset()->value()),
4152 v8::Integer::New(script->column_offset()->value())); 4152 v8::Integer::New(script->column_offset()->value()),
4153 v8::Boolean::New(script->is_shared_cross_origin()));
4153 return origin; 4154 return origin;
4154 } 4155 }
4155 return v8::ScriptOrigin(Handle<Value>()); 4156 return v8::ScriptOrigin(Handle<Value>());
4156 } 4157 }
4157 4158
4158 4159
4159 const int Function::kLineOffsetNotFound = -1; 4160 const int Function::kLineOffsetNotFound = -1;
4160 4161
4161 4162
4162 int Function::GetScriptLineNumber() const { 4163 int Function::GetScriptLineNumber() const {
(...skipping 3415 matching lines...) Expand 10 before | Expand all | Expand 10 after
7578 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7579 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7579 Address callback_address = 7580 Address callback_address =
7580 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7581 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7581 VMState<EXTERNAL> state(isolate); 7582 VMState<EXTERNAL> state(isolate);
7582 ExternalCallbackScope call_scope(isolate, callback_address); 7583 ExternalCallbackScope call_scope(isolate, callback_address);
7583 callback(info); 7584 callback(info);
7584 } 7585 }
7585 7586
7586 7587
7587 } } // namespace v8::internal 7588 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698