[gjs/wip/ptomato/mozjs52: 26/40] js: Update obsolete comments



commit 8249fd259f6e5b78093e325b698d7cf38521d00b
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Apr 16 13:19:49 2017 -0700

    js: Update obsolete comments
    
    These comments were previously correct, but have become incorrect in
    SpiderMonkey 45.

 gi/boxed.cpp                |    2 +-
 gi/function.cpp             |    2 +-
 gi/fundamental.cpp          |    2 +-
 gi/gerror.cpp               |    2 +-
 gi/interface.cpp            |    2 +-
 gi/ns.cpp                   |    2 +-
 gi/object.cpp               |    2 +-
 gi/param.cpp                |    2 +-
 gi/repo.cpp                 |    2 +-
 gi/union.cpp                |    2 +-
 gjs/byteArray.cpp           |    2 +-
 gjs/coverage.cpp            |    7 +------
 gjs/importer.cpp            |    2 +-
 gjs/jsapi-class.h           |    2 +-
 gjs/jsapi-dynamic-class.cpp |    7 ++-----
 gjs/jsapi-util.cpp          |    2 +-
 test/gjs-test-rooting.cpp   |    2 +-
 17 files changed, 18 insertions(+), 26 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 97661d3..a1d24c3 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -940,7 +940,7 @@ struct JSClass gjs_boxed_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     boxed_resolve,
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     boxed_finalize,
     NULL,  /* call */
     NULL,  /* hasInstance */
diff --git a/gi/function.cpp b/gi/function.cpp
index b70efae..074904d 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1493,7 +1493,7 @@ struct JSClass gjs_function_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     NULL,  /* resolve */
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     function_finalize,
     function_call
 };
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp
index a5d2713..a213d35 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -564,7 +564,7 @@ struct JSClass gjs_fundamental_instance_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     fundamental_instance_resolve,
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     fundamental_finalize,
     NULL,  /* call */
     NULL,  /* hasInstance */
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index 2e6ebd2..00cc3cf 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -279,7 +279,7 @@ struct JSClass gjs_error_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     NULL,  /* resolve */
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     error_finalize
 };
 
diff --git a/gi/interface.cpp b/gi/interface.cpp
index 2be2053..b1f9647 100644
--- a/gi/interface.cpp
+++ b/gi/interface.cpp
@@ -172,7 +172,7 @@ struct JSClass gjs_interface_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     interface_resolve,
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     interface_finalize
 };
 
diff --git a/gi/ns.cpp b/gi/ns.cpp
index 6f96f3a..7c5fe2b 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -165,7 +165,7 @@ struct JSClass gjs_ns_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     ns_resolve,
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     ns_finalize
 };
 
diff --git a/gi/object.cpp b/gi/object.cpp
index 604f744..ddcf1d7 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1815,7 +1815,7 @@ struct JSClass gjs_object_instance_class = {
     object_instance_set_prop,
     NULL,  /* enumerate */
     object_instance_resolve,
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     object_instance_finalize,
     NULL,
     NULL,
diff --git a/gi/param.cpp b/gi/param.cpp
index e9b2ef4..d2e6e5a 100644
--- a/gi/param.cpp
+++ b/gi/param.cpp
@@ -154,7 +154,7 @@ struct JSClass gjs_param_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     param_resolve,
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     param_finalize
 };
 
diff --git a/gi/repo.cpp b/gi/repo.cpp
index 5c10be9..cdc5064 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -234,7 +234,7 @@ struct JSClass gjs_repo_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     repo_resolve,
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     repo_finalize
 };
 
diff --git a/gi/union.cpp b/gi/union.cpp
index b6d10a8..8823b91 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -301,7 +301,7 @@ struct JSClass gjs_union_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     union_resolve,
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     union_finalize
 };
 
diff --git a/gjs/byteArray.cpp b/gjs/byteArray.cpp
index 200ae99..9395a74 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -65,7 +65,7 @@ struct JSClass gjs_byte_array_class = {
     byte_array_set_prop,
     NULL,  /* enumerate */
     NULL,  /* resolve */
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     byte_array_finalize
 };
 
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index 6379d30..1ca90c1 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1268,7 +1268,7 @@ static JSClass coverage_global_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     NULL,  /* resolve */
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     NULL,  /* finalize */
     NULL,  /* call */
     NULL,  /* hasInstance */
@@ -1716,11 +1716,6 @@ gjs_coverage_constructed(GObject *object)
         priv->cache = g_file_new_for_path(".internal-gjs-coverage-cache");
     }
 
-    /* We now enable Ion and BaselineJIT in coverage mode. See the comment
-     * in gjs/runtime.cpp:gjs_clear_thread_runtime for some important
-     * information regarding runtime lifecycle management and garbage collection
-     * bugs in js24 */
-
     if (!bootstrap_coverage(coverage)) {
         JSContext *context = static_cast<JSContext *>(gjs_context_get_native_context(priv->context));
         JSAutoCompartment compartment(context, gjs_get_import_global(context));
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index b9097a8..505f717 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -869,7 +869,7 @@ const js::Class gjs_importer_real_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate (see below) */
     importer_resolve,
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     importer_finalize,
     NULL,  /* call */
     NULL,  /* hasInstance */
diff --git a/gjs/jsapi-class.h b/gjs/jsapi-class.h
index 7797901..47696e0 100644
--- a/gjs/jsapi-class.h
+++ b/gjs/jsapi-class.h
@@ -179,7 +179,7 @@ static struct JSClass gjs_##cname##_class = {                                \
     nullptr,  /* setProperty */                                              \
     nullptr,  /* enumerate */                                                \
     nullptr,  /* resolve */                                                  \
-    nullptr,  /* convert */                                                  \
+    nullptr,  /* mayResolve */                                               \
     gjs_##cname##_finalize                                                   \
 };                                                                           \
 _GJS_DEFINE_GET_PROTO(cname)                                                 \
diff --git a/gjs/jsapi-dynamic-class.cpp b/gjs/jsapi-dynamic-class.cpp
index 36e830d..d0e947b 100644
--- a/gjs/jsapi-dynamic-class.cpp
+++ b/gjs/jsapi-dynamic-class.cpp
@@ -79,11 +79,8 @@ gjs_init_class_dynamic(JSContext              *context,
     if (parent_proto) {
         prototype.set(JS_NewObjectWithGivenProto(context, clasp, parent_proto));
     } else {
-        /* JS_NewObject will try to search for clasp prototype in the
-         * global object, which is wrong, but it's not a problem because
-         * it will fallback to Object.prototype if the clasp's
-         * constructor is not found (and it won't be found, because we
-         * never call JS_InitClass).
+        /* JS_NewObject will use Object.prototype as the prototype if the
+         * clasp's constructor is not a built-in class.
          */
         prototype.set(JS_NewObject(context, clasp));
     }
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index 1b65d2c..9e1692e 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -54,7 +54,7 @@ static JSClass global_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     NULL,  /* resolve */
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     NULL,  /* finalize */
     NULL,  /* call */
     NULL,  /* hasInstance */
diff --git a/test/gjs-test-rooting.cpp b/test/gjs-test-rooting.cpp
index 240455f..99bb0bc 100644
--- a/test/gjs-test-rooting.cpp
+++ b/test/gjs-test-rooting.cpp
@@ -33,7 +33,7 @@ static JSClass test_obj_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     NULL,  /* resolve */
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     test_obj_finalize
 };
 


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