[gjs/wip/ptomato/mozjs31: 8/8] not work
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs31: 8/8] not work
- Date: Fri, 21 Oct 2016 02:06:09 +0000 (UTC)
commit 538ee5f7becfdfa9e9e8e9e25749b034ba0782ff
Author: Philip Chimento <philip endlessm com>
Date: Thu Oct 20 18:28:44 2016 -0700
not work
gjs/importer.cpp | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 927a299..1a2c21b 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -149,22 +149,22 @@ define_import(JSContext *context,
* we do this after the import succesfully completes.
*/
static bool
-seal_import(JSContext *context,
- JSObject *obj,
- const char *name)
+seal_import(JSContext *context,
+ JS::HandleObject obj,
+ const char *name)
{
bool found;
- unsigned attrs;
+ JS::Rooted<JSPropertyDescriptor> desc(context);
- if (!JS_GetPropertyAttributes(context, obj, name,
- &attrs, &found) || !found) {
+ if (!JS_GetOwnPropertyDescriptor(context, obj, name, &desc) ||
+ desc.object() == NULL) {
gjs_debug(GJS_DEBUG_IMPORTER,
"Failed to get attributes to seal '%s' in importer",
name);
return false;
}
- attrs |= JSPROP_PERMANENT;
+ desc.attributes() |= JSPROP_PERMANENT;
if (!JS_SetPropertyAttributes(context, obj, name,
attrs, &found) || !found) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]