[gjs/wip/ptomato/mozjs31: 29/29] WIP - stuff



commit 10fe2e4e507e2b81f956caf1f6b98703ff5d3bca
Author: Philip Chimento <philip endlessm com>
Date:   Thu Nov 10 18:58:02 2016 -0800

    WIP - stuff

 gi/repo.cpp       |    1 -
 gjs/byteArray.cpp |    4 +---
 2 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gi/repo.cpp b/gi/repo.cpp
index 8dadb46..00c6e64 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -595,7 +595,6 @@ lookup_override_function(JSContext   *cx,
     return function.toObjectOrNull();
 
  fail:
-    /* COMPAT: Use JS::AutoSaveExceptionState and move rooting to be late */
     JS_ClearPendingException(cx);
     return NULL;
 }
diff --git a/gjs/byteArray.cpp b/gjs/byteArray.cpp
index 49c19fa..453f951 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -357,9 +357,7 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(byte_array)
 
     preallocated_length = 0;
     if (argc >= 1) {
-        // COMPAT: in mozjs31 indexing CallArgs will already yield a rooted value
-        JS::RootedValue val(context, argv[0]);
-        if (!gjs_value_to_gsize(context, val, &preallocated_length)) {
+        if (!gjs_value_to_gsize(context, argv[0], &preallocated_length)) {
             gjs_throw(context,
                       "Argument to ByteArray constructor should be a positive number for array length");
             return false;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]