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

Unified Diff: src/api.cc

Issue 1371893002: objects-inl.h: Remove ACCESSORS_TO_SMI macro (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: undo last_script_id storage change Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/allocation-tracker.cc ('k') | src/bootstrapper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 1cb00f271fa7d0e9a4c7f0014606eb74535f8438..d16b589ec0ad14cc3857af6a1667a3111217e675 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -195,10 +195,10 @@ static ScriptOrigin GetScriptOriginForScript(i::Isolate* isolate,
ScriptOriginOptions options(script->origin_options());
v8::ScriptOrigin origin(
Utils::ToLocal(scriptName),
- v8::Integer::New(v8_isolate, script->line_offset()->value()),
- v8::Integer::New(v8_isolate, script->column_offset()->value()),
+ v8::Integer::New(v8_isolate, script->line_offset()),
+ v8::Integer::New(v8_isolate, script->column_offset()),
v8::Boolean::New(v8_isolate, options.IsSharedCrossOrigin()),
- v8::Integer::New(v8_isolate, script->id()->value()),
+ v8::Integer::New(v8_isolate, script->id()),
v8::Boolean::New(v8_isolate, options.IsEmbedderDebugScript()),
Utils::ToLocal(source_map_url),
v8::Boolean::New(v8_isolate, options.IsOpaque()));
@@ -1611,7 +1611,7 @@ int UnboundScript::GetId() {
i::Handle<i::SharedFunctionInfo> function_info(
i::SharedFunctionInfo::cast(*obj));
i::Handle<i::Script> script(i::Script::cast(function_info->script()));
- return script->id()->value();
+ return script->id();
}
@@ -1984,12 +1984,12 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context,
script->set_name(*Utils::OpenHandle(*(origin.ResourceName())));
}
if (!origin.ResourceLineOffset().IsEmpty()) {
- script->set_line_offset(i::Smi::FromInt(
- static_cast<int>(origin.ResourceLineOffset()->Value())));
+ script->set_line_offset(
+ static_cast<int>(origin.ResourceLineOffset()->Value()));
}
if (!origin.ResourceColumnOffset().IsEmpty()) {
- script->set_column_offset(i::Smi::FromInt(
- static_cast<int>(origin.ResourceColumnOffset()->Value())));
+ script->set_column_offset(
+ static_cast<int>(origin.ResourceColumnOffset()->Value()));
}
script->set_origin_options(origin.Options());
if (!origin.SourceMapUrl().IsEmpty()) {
@@ -4437,7 +4437,7 @@ int Function::ScriptId() const {
return v8::UnboundScript::kNoScriptId;
}
i::Handle<i::Script> script(i::Script::cast(func->shared()->script()));
- return script->id()->value();
+ return script->id();
}
« no previous file with comments | « src/allocation-tracker.cc ('k') | src/bootstrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698