Commit b0128271 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix gcmole offenders.

R=mstarzinger@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11419309

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 192d21b5
......@@ -938,7 +938,7 @@ JSArray* LiveEdit::GatherCompileInfo(Handle<Script> script,
}
// A logical 'catch' section.
Handle<Object> rethrow_exception;
Handle<JSObject> rethrow_exception;
if (isolate->has_pending_exception()) {
Handle<Object> exception(isolate->pending_exception()->ToObjectChecked());
MessageLocation message_location = isolate->GetMessageLocation();
......@@ -948,24 +948,25 @@ JSArray* LiveEdit::GatherCompileInfo(Handle<Script> script,
// If possible, copy positions from message object to exception object.
if (exception->IsJSObject() && !message_location.script().is_null()) {
Handle<JSObject> exception_struct = Handle<JSObject>::cast(exception);
rethrow_exception = Handle<JSObject>::cast(exception);
Factory* factory = isolate->factory();
JSReceiver::SetProperty(exception_struct,
factory->LookupAsciiSymbol("startPosition"),
Handle<Smi>(Smi::FromInt(message_location.start_pos())),
NONE, kNonStrictMode);
JSReceiver::SetProperty(exception_struct,
factory->LookupAsciiSymbol("endPosition"),
Handle<Smi>(Smi::FromInt(message_location.end_pos())),
NONE, kNonStrictMode);
JSReceiver::SetProperty(exception_struct,
factory->LookupAsciiSymbol("scriptObject"),
GetScriptWrapper(message_location.script()),
NONE, kNonStrictMode);
Handle<String> start_pos_key =
factory->LookupAsciiSymbol("startPosition");
Handle<String> end_pos_key =
factory->LookupAsciiSymbol("endPosition");
Handle<String> script_obj_key =
factory->LookupAsciiSymbol("scriptObject");
Handle<Smi> start_pos(Smi::FromInt(message_location.start_pos()));
Handle<Smi> end_pos(Smi::FromInt(message_location.end_pos()));
Handle<JSValue> script_obj = GetScriptWrapper(message_location.script());
JSReceiver::SetProperty(
rethrow_exception, start_pos_key, start_pos, NONE, kNonStrictMode);
JSReceiver::SetProperty(
rethrow_exception, end_pos_key, end_pos, NONE, kNonStrictMode);
JSReceiver::SetProperty(
rethrow_exception, script_obj_key, script_obj, NONE, kNonStrictMode);
}
rethrow_exception = exception;
}
// A logical 'finally' section.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment