Reviewers: Michael Starzinger,

Message:
fixed. could you land this?


https://codereview.chromium.org/14075012/diff/1/src/extensions/gc-extension.cc
File src/extensions/gc-extension.cc (right):

https://codereview.chromium.org/14075012/diff/1/src/extensions/gc-extension.cc#newcode34
src/extensions/gc-extension.cc:34: "native function v8_force_gc();
function gc() { v8_force_gc(); }";
On 2013/04/22 11:42:03, Michael Starzinger wrote:
This break the optional boolean argument that you can pass to gc() as
well. The
correct delegation pattern is the following I think.

function gc() {
   return v8_force_gc.apply(this, arguments);
}

Done.

Description:
Expose the GC under a name that is less collision prone than window.gc.

This also keeps backwards compatibility (window.gc() still works).

BUG=2641

Please review this at https://codereview.chromium.org/14075012/

SVN Base: git://github.com/v8/v8.git@master

Affected files:
  M src/extensions/gc-extension.cc


Index: src/extensions/gc-extension.cc
diff --git a/src/extensions/gc-extension.cc b/src/extensions/gc-extension.cc
index 813b9219bfec7eacd0638cf002c8abb368bba3d2..7463540064dc5d443387c36708c0772a1b7b1c6d 100644
--- a/src/extensions/gc-extension.cc
+++ b/src/extensions/gc-extension.cc
@@ -30,7 +30,9 @@
 namespace v8 {
 namespace internal {

-const char* const GCExtension::kSource = "native function gc();";
+const char* const GCExtension::kSource =
+    "native function v8_force_gc(); "
+    "function gc() { v8_force_gc.apply(this, arguments); }";


 v8::Handle<v8::FunctionTemplate> GCExtension::GetNativeFunction(


--
--
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.


Reply via email to