Commit 17fab1df authored by yangguo@chromium.org's avatar yangguo@chromium.org

Improve handle allocation in JSON.parse.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f3807ca1
......@@ -176,8 +176,8 @@ Handle<Object> JsonParser<seq_ascii>::ParseJson(Handle<String> source,
Zone* zone) {
isolate_ = source->map()->GetHeap()->isolate();
factory_ = isolate_->factory();
object_constructor_ =
Handle<JSFunction>(isolate()->native_context()->object_function());
object_constructor_ = Handle<JSFunction>(
isolate()->native_context()->object_function(), isolate());
zone_ = zone;
FlattenString(source);
source_ = source;
......@@ -611,7 +611,7 @@ Handle<String> JsonParser<seq_ascii>::ScanJsonString() {
Advance();
if (c0_ == '"') {
AdvanceSkipWhitespace();
return Handle<String>(isolate()->heap()->empty_string());
return factory()->empty_string();
}
if (seq_ascii && is_symbol) {
......@@ -657,7 +657,7 @@ Handle<String> JsonParser<seq_ascii>::ScanJsonString() {
position_ = position;
// Advance past the last '"'.
AdvanceSkipWhitespace();
return Handle<String>(String::cast(element));
return Handle<String>(String::cast(element), isolate());
}
entry = SymbolTable::NextProbe(entry, count++, capacity);
}
......
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