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

Side by Side Diff: src/api.cc

Issue 363553005: Add ScriptID field into ScriptOrigin class. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 5 months 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 | « include/v8.h ('k') | no next file » | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 i::Handle<i::Object>(message->script(), isolate); 1969 i::Handle<i::Object>(message->script(), isolate);
1970 i::Handle<i::JSValue> script_value = 1970 i::Handle<i::JSValue> script_value =
1971 i::Handle<i::JSValue>::cast(script_wraper); 1971 i::Handle<i::JSValue>::cast(script_wraper);
1972 i::Handle<i::Script> script(i::Script::cast(script_value->value())); 1972 i::Handle<i::Script> script(i::Script::cast(script_value->value()));
1973 i::Handle<i::Object> scriptName(i::Script::GetNameOrSourceURL(script)); 1973 i::Handle<i::Object> scriptName(i::Script::GetNameOrSourceURL(script));
1974 v8::Isolate* v8_isolate = 1974 v8::Isolate* v8_isolate =
1975 reinterpret_cast<v8::Isolate*>(script->GetIsolate()); 1975 reinterpret_cast<v8::Isolate*>(script->GetIsolate());
1976 v8::ScriptOrigin origin( 1976 v8::ScriptOrigin origin(
1977 Utils::ToLocal(scriptName), 1977 Utils::ToLocal(scriptName),
1978 v8::Integer::New(v8_isolate, script->line_offset()->value()), 1978 v8::Integer::New(v8_isolate, script->line_offset()->value()),
1979 v8::Integer::New(v8_isolate, script->column_offset()->value())); 1979 v8::Integer::New(v8_isolate, script->column_offset()->value()),
1980 Handle<Boolean>(),
1981 v8::Integer::New(v8_isolate, script->id()->value()));
1980 return origin; 1982 return origin;
1981 } 1983 }
1982 1984
1983 1985
1984 v8::Handle<Value> Message::GetScriptResourceName() const { 1986 v8::Handle<Value> Message::GetScriptResourceName() const {
1985 return GetScriptOrigin().ResourceName(); 1987 return GetScriptOrigin().ResourceName();
1986 } 1988 }
1987 1989
1988 1990
1989 v8::Handle<v8::StackTrace> Message::GetStackTrace() const { 1991 v8::Handle<v8::StackTrace> Message::GetStackTrace() const {
(...skipping 5641 matching lines...) Expand 10 before | Expand all | Expand 10 after
7631 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7633 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7632 Address callback_address = 7634 Address callback_address =
7633 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7635 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7634 VMState<EXTERNAL> state(isolate); 7636 VMState<EXTERNAL> state(isolate);
7635 ExternalCallbackScope call_scope(isolate, callback_address); 7637 ExternalCallbackScope call_scope(isolate, callback_address);
7636 callback(info); 7638 callback(info);
7637 } 7639 }
7638 7640
7639 7641
7640 } } // namespace v8::internal 7642 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698