Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Improve handle allocation in JSON.parse. (issue 11358065)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
yang...@chromium.org  
View profile  
 More options Nov 2 2012, 11:52 am
From: yang...@chromium.org
Date: Fri, 02 Nov 2012 15:52:25 +0000
Local: Fri, Nov 2 2012 11:52 am
Subject: Improve handle allocation in JSON.parse. (issue 11358065)
Reviewers: Toon Verwaest,

Message:
PTAL.

Description:
Improve handle allocation in JSON.parse.

BUG=

Please review this at http://codereview.chromium.org/11358065/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
   M src/json-parser.h

Index: src/json-parser.h
diff --git a/src/json-parser.h b/src/json-parser.h
index  
dc757c993606b4c6f64ee070ee43c9b0cc1d9435..c18ec38dedcd6e7b0a5a668c9f0acaec0 a55e780  
100644
--- a/src/json-parser.h
+++ b/src/json-parser.h
@@ -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 isolate()->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);
      }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
verwa...@chromium.org  
View profile  
 More options Nov 5 2012, 5:14 am
From: verwa...@chromium.org
Date: Mon, 05 Nov 2012 10:14:47 +0000
Local: Mon, Nov 5 2012 5:14 am
Subject: Re: Improve handle allocation in JSON.parse. (issue 11358065)
lgtm with nit

https://chromiumcodereview.appspot.com/11358065/diff/1/src/json-parser.h
File src/json-parser.h (right):

https://chromiumcodereview.appspot.com/11358065/diff/1/src/json-parse...
src/json-parser.h:614: return isolate()->factory()->empty_string();
You can directly use factory() without isolate()->

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »