Hello, 

I am working on Node.js core and I am trying to suggest a patch (attached) 
for v8 for https://github.com/joyent/node/issues/7120.

I followed all the instructions on the Wiki on how to contribute but had no 
luck with uploading the patch for review, both using git and svn.

*With git:*
git cl config http://v8.googlecode.com/svn
Traceback (most recent call last):
  File "c:\Node\depot_tools\\git_cl.py", line 2439, in <module>
    sys.exit(main(sys.argv[1:]))
  File "c:\Node\depot_tools\\git_cl.py", line 2425, in main
    return dispatcher.execute(OptionParser(), argv)
  File "c:\Node\depot_tools\subcommand.py", line 245, in execute
    return command(parser, args[1:])
  File "c:\Node\depot_tools\\git_cl.py", line 1133, in CMDconfig
    LoadCodereviewSettingsFromFile(urllib2.urlopen(url))
  File "c:\Node\depot_tools\\git_cl.py", line 1030, in 
LoadCodereviewSettingsFromFile
    keyvals = gclient_utils.ParseCodereviewSettingsContent(fileobj.read())
  File "c:\Node\depot_tools\gclient_utils.py", line 902, in 
ParseCodereviewSettingsContent
    'Failed to process settings, please fix. Content:\n\n%s' % content)
gclient_utils.Error: Failed to process settings, please fix. Content:

<html><head><title>v8 - Revision 19529: /</title></head>
<body>
 <h2>v8 - Revision 19529: /</h2>
 <ul>
  <li><a href="branches/">branches/</a></li>
  <li><a href="codereview.settings">codereview.settings</a></li>
  <li><a href="data/">data/</a></li>
  <li><a href="tags/">tags/</a></li>
  <li><a href="trunk/">trunk/</a></li>
  <li><a href="wiki/">wiki/</a></li>
 </ul>
 <hr noshade><em><a href="http://code.google.com/";>Google Code</a> powered 
by <a href="http://subversion.apache.org/";>Subversion</a></em>
</body></html>

And then when I try git cl upload:
Total errors found: 122
Total violating files: 0

** Presubmit Messages **
Missing OWNER reviewers for these files:
    src\bootstrapper.cc
    src\isolate.h

Suggested OWNERS: (Use "git-cl owners" to interactively select owners.)
    [email protected]

** Presubmit ERRORS **
C++ lint check failed

Presubmit checks took 46.9s to calculate.

Those 122 error seem legit but are not files that I touched. I just cloned 
the repo from github.

*When using svn:*
c:\v8>gcl change mychange
To use gcl, you need to be in a subversion checkout.

...and that's the root of my subversion checkout.

Any help would be greatly appreciated. I am looking forward to getting 
feedback on this patch.

Thanks,
Alexis Campailla

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
Index: bootstrapper.cc
===================================================================
--- bootstrapper.cc	(revision 19529)
+++ bootstrapper.cc	(working copy)
@@ -1477,7 +1477,11 @@
   // environment has been at least partially initialized. Add a stack check
   // before entering JS code to catch overflow early.
   StackLimitCheck check(isolate);
-  if (check.HasOverflowed()) return false;
+  if (check.WillOverflow(5000 * sizeof(intptr_t))) {
+    isolate->StackOverflow();
+    isolate->OptionalRescheduleException(true);
+    return false;
+  }
 
   bool result = CompileScriptCached(isolate,
                                     name,
@@ -2608,7 +2612,11 @@
   // environment has been at least partially initialized. Add a stack check
   // before entering JS code to catch overflow early.
   StackLimitCheck check(isolate);
-  if (check.HasOverflowed()) return;
+  if (check.WillOverflow(6000 * sizeof(intptr_t))) {
+    isolate->StackOverflow();
+    isolate->OptionalRescheduleException(true);
+    return;
+  }
 
   // We can only de-serialize a context if the isolate was initialized from
   // a snapshot. Otherwise we have to build the context from scratch.
Index: isolate.h
===================================================================
--- isolate.h	(revision 19529)
+++ isolate.h	(working copy)
@@ -1449,6 +1449,11 @@
     StackGuard* stack_guard = isolate_->stack_guard();
     return (reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit());
   }
+  bool WillOverflow(uint32_t additionalUsage) const {
+    StackGuard* stack_guard = isolate_->stack_guard();
+    return (reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit() +
+        additionalUsage);
+  }
  private:
   Isolate* isolate_;
 };

Reply via email to