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, ...@@ -938,7 +938,7 @@ JSArray* LiveEdit::GatherCompileInfo(Handle<Script> script,
} }
// A logical 'catch' section. // A logical 'catch' section.
Handle<Object> rethrow_exception; Handle<JSObject> rethrow_exception;
if (isolate->has_pending_exception()) { if (isolate->has_pending_exception()) {
Handle<Object> exception(isolate->pending_exception()->ToObjectChecked()); Handle<Object> exception(isolate->pending_exception()->ToObjectChecked());
MessageLocation message_location = isolate->GetMessageLocation(); MessageLocation message_location = isolate->GetMessageLocation();
...@@ -948,24 +948,25 @@ JSArray* LiveEdit::GatherCompileInfo(Handle<Script> script, ...@@ -948,24 +948,25 @@ JSArray* LiveEdit::GatherCompileInfo(Handle<Script> script,
// If possible, copy positions from message object to exception object. // If possible, copy positions from message object to exception object.
if (exception->IsJSObject() && !message_location.script().is_null()) { 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(); Factory* factory = isolate->factory();
JSReceiver::SetProperty(exception_struct, Handle<String> start_pos_key =
factory->LookupAsciiSymbol("startPosition"), factory->LookupAsciiSymbol("startPosition");
Handle<Smi>(Smi::FromInt(message_location.start_pos())), Handle<String> end_pos_key =
NONE, kNonStrictMode); factory->LookupAsciiSymbol("endPosition");
JSReceiver::SetProperty(exception_struct, Handle<String> script_obj_key =
factory->LookupAsciiSymbol("endPosition"), factory->LookupAsciiSymbol("scriptObject");
Handle<Smi>(Smi::FromInt(message_location.end_pos())), Handle<Smi> start_pos(Smi::FromInt(message_location.start_pos()));
NONE, kNonStrictMode); Handle<Smi> end_pos(Smi::FromInt(message_location.end_pos()));
JSReceiver::SetProperty(exception_struct, Handle<JSValue> script_obj = GetScriptWrapper(message_location.script());
factory->LookupAsciiSymbol("scriptObject"), JSReceiver::SetProperty(
GetScriptWrapper(message_location.script()), rethrow_exception, start_pos_key, start_pos, NONE, kNonStrictMode);
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. // 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