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

Unified Diff: src/api.cc

Issue 6606002: Merge revision 6500-6600 from bleeding_edge to the isolates branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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/accessors.cc ('k') | src/arm/assembler-arm.h » ('j') | src/ast.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
===================================================================
--- src/api.cc (revision 7030)
+++ src/api.cc (working copy)
@@ -1508,11 +1508,11 @@
}
ENTER_V8;
HandleScope scope;
- i::Handle<i::JSObject> obj =
- i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
+ i::Handle<i::JSMessageObject> message =
+ i::Handle<i::JSMessageObject>::cast(Utils::OpenHandle(this));
// Return this.script.name.
i::Handle<i::JSValue> script =
- i::Handle<i::JSValue>::cast(GetProperty(obj, "script"));
+ i::Handle<i::JSValue>::cast(i::Handle<i::Object>(message->script()));
i::Handle<i::Object> resource_name(i::Script::cast(script->value())->name());
return scope.Close(Utils::ToLocal(resource_name));
}
@@ -1524,11 +1524,11 @@
}
ENTER_V8;
HandleScope scope;
- i::Handle<i::JSObject> obj =
- i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
+ i::Handle<i::JSMessageObject> message =
+ i::Handle<i::JSMessageObject>::cast(Utils::OpenHandle(this));
// Return this.script.data.
i::Handle<i::JSValue> script =
- i::Handle<i::JSValue>::cast(GetProperty(obj, "script"));
+ i::Handle<i::JSValue>::cast(i::Handle<i::Object>(message->script()));
i::Handle<i::Object> data(i::Script::cast(script->value())->data());
return scope.Close(Utils::ToLocal(data));
}
@@ -1540,9 +1540,9 @@
}
ENTER_V8;
HandleScope scope;
- i::Handle<i::JSObject> obj =
- i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
- i::Handle<i::Object> stackFramesObj = GetProperty(obj, "stackFrames");
+ i::Handle<i::JSMessageObject> message =
+ i::Handle<i::JSMessageObject>::cast(Utils::OpenHandle(this));
+ i::Handle<i::Object> stackFramesObj(message->stack_frames());
if (!stackFramesObj->IsJSArray()) return v8::Handle<v8::StackTrace>();
i::Handle<i::JSArray> stackTrace =
i::Handle<i::JSArray>::cast(stackFramesObj);
@@ -1583,6 +1583,7 @@
ON_BAILOUT("v8::Message::GetLineNumber()", return kNoLineNumberInfo);
ENTER_V8;
HandleScope scope;
+
EXCEPTION_PREAMBLE();
i::Handle<i::Object> result = CallV8HeapFunction("GetLineNumber",
Utils::OpenHandle(this),
@@ -1596,9 +1597,9 @@
if (IsDeadCheck("v8::Message::GetStartPosition()")) return 0;
ENTER_V8;
HandleScope scope;
-
- i::Handle<i::JSObject> data_obj = Utils::OpenHandle(this);
- return static_cast<int>(GetProperty(data_obj, "startPos")->Number());
+ i::Handle<i::JSMessageObject> message =
+ i::Handle<i::JSMessageObject>::cast(Utils::OpenHandle(this));
+ return message->start_position();
}
@@ -1606,8 +1607,9 @@
if (IsDeadCheck("v8::Message::GetEndPosition()")) return 0;
ENTER_V8;
HandleScope scope;
- i::Handle<i::JSObject> data_obj = Utils::OpenHandle(this);
- return static_cast<int>(GetProperty(data_obj, "endPos")->Number());
+ i::Handle<i::JSMessageObject> message =
+ i::Handle<i::JSMessageObject>::cast(Utils::OpenHandle(this));
+ return message->end_position();
}
@@ -1637,8 +1639,10 @@
data_obj,
&has_pending_exception);
EXCEPTION_BAILOUT_CHECK(0);
- int start = static_cast<int>(GetProperty(data_obj, "startPos")->Number());
- int end = static_cast<int>(GetProperty(data_obj, "endPos")->Number());
+ i::Handle<i::JSMessageObject> message =
+ i::Handle<i::JSMessageObject>::cast(data_obj);
+ int start = message->start_position();
+ int end = message->end_position();
return static_cast<int>(start_col_obj->Number()) + (end - start);
}
« no previous file with comments | « src/accessors.cc ('k') | src/arm/assembler-arm.h » ('j') | src/ast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698