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



commit e50c6eee55569532020423cc28f93d95612574bf
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 0078a85..d5d830f 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -929,7 +929,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 f38f756..c2623b1 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -558,7 +558,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 294bc0d..40a4209 100644
--- a/gi/interface.cpp
+++ b/gi/interface.cpp
@@ -167,7 +167,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 edf0c67..6c7b756 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -160,7 +160,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 9e5a0fb..37447fe 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1802,7 +1802,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 a5af764..1693858 100644
--- a/gi/param.cpp
+++ b/gi/param.cpp
@@ -152,7 +152,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 580a7aa..97e7a25 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -230,7 +230,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 13da881..f358524 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -296,7 +296,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 a14f65d..1fbd787 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 6f54c2c..e527a39 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1270,7 +1270,7 @@ static JSClass coverage_global_class = {
     NULL,  /* setProperty */
     NULL,  /* enumerate */
     NULL,  /* resolve */
-    NULL,  /* convert */
+    nullptr,  /* mayResolve */
     NULL,  /* finalize */
     NULL,  /* call */
     NULL,  /* hasInstance */
@@ -1717,11 +1717,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 3c78404..6926a6f 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -837,7 +837,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 7c33fb3..9106afb 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 64cf909..8e2ab1d 100644
--- a/test/gjs-test-rooting.cpp
+++ b/test/gjs-test-rooting.cpp
@@ -35,7 +35,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]