Revision: 17509
Author:   [email protected]
Date:     Wed Nov  6 06:59:32 2013 UTC
Log: Add isolate parameter to SetResourceConstraints, and deprecate version which depends on current isolate.

BUG=None
[email protected]

Review URL: https://codereview.chromium.org/38993005
http://code.google.com/p/v8/source/detail?r=17509

Modified:
 /branches/bleeding_edge/include/v8.h
 /branches/bleeding_edge/src/api.cc

=======================================
--- /branches/bleeding_edge/include/v8.h        Wed Oct 23 12:38:06 2013 UTC
+++ /branches/bleeding_edge/include/v8.h        Wed Nov  6 06:59:32 2013 UTC
@@ -3788,10 +3788,16 @@
 };


+V8_DEPRECATED(
+    "Use SetResourceConstraints(isolate, constraints) instead",
+ bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints));
+
+
 /**
- * Sets the given ResourceConstraints on the current isolate.
+ * Sets the given ResourceConstraints on the given Isolate.
  */
-bool V8_EXPORT SetResourceConstraints(ResourceConstraints* constraints);
+bool V8_EXPORT SetResourceConstraints(Isolate* isolate,
+                                      ResourceConstraints* constraints);


 // --- Exceptions ---
=======================================
--- /branches/bleeding_edge/src/api.cc  Tue Nov  5 14:24:57 2013 UTC
+++ /branches/bleeding_edge/src/api.cc  Wed Nov  6 06:59:32 2013 UTC
@@ -568,7 +568,14 @@

 bool SetResourceConstraints(ResourceConstraints* constraints) {
   i::Isolate* isolate = EnterIsolateIfNeeded();
+  return SetResourceConstraints(reinterpret_cast<Isolate*>(isolate),
+                                constraints);
+}

+
+bool SetResourceConstraints(Isolate* v8_isolate,
+                            ResourceConstraints* constraints) {
+  i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
   int young_space_size = constraints->max_young_space_size();
   int old_gen_size = constraints->max_old_space_size();
   int max_executable_size = constraints->max_executable_size();

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