[gjs] Remove support for E4X
- From: Tim Lunn <timl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] Remove support for E4X
- Date: Fri, 25 Oct 2013 00:38:43 +0000 (UTC)
commit 8a9d23302b0afff39f2b8ae4fcebba8aa17075e2
Author: Tim Lunn <tim feathertop org>
Date: Fri Oct 25 09:28:46 2013 +1100
Remove support for E4X
https://bugzilla.gnome.org/show_bug.cgi?id=691409
gjs/context.c | 2 +-
installed-tests/js/testGDBus.js | 148 ++++++++++++++++++++-------------------
modules/overrides/Gio.js | 18 +-----
3 files changed, 77 insertions(+), 91 deletions(-)
---
diff --git a/gjs/context.c b/gjs/context.c
index cb2fe1b..c3228a8 100644
--- a/gjs/context.c
+++ b/gjs/context.c
@@ -587,7 +587,7 @@ gjs_context_constructor (GType type,
*
* JSOPTION_STRICT: Report warnings to error reporter function.
*/
- options_flags = JSOPTION_DONT_REPORT_UNCAUGHT | JSOPTION_STRICT | JSOPTION_ALLOW_XML;
+ options_flags = JSOPTION_DONT_REPORT_UNCAUGHT | JSOPTION_STRICT;
if (!g_getenv("GJS_DISABLE_JIT")) {
gjs_debug(GJS_DEBUG_CONTEXT, "Enabling JIT");
diff --git a/installed-tests/js/testGDBus.js b/installed-tests/js/testGDBus.js
index 53dc766..0135d52 100644
--- a/installed-tests/js/testGDBus.js
+++ b/installed-tests/js/testGDBus.js
@@ -8,79 +8,81 @@ const Mainloop = imports.mainloop;
*
* *** NOTE: If you add stuff here, you need to update testIntrospectReal
*/
-var TestIface = <interface name="org.gnome.gjs.Test">
-<method name="nonJsonFrobateStuff">
- <arg type="i" direction="in"/>
- <arg type="s" direction="out"/>
-</method>
-<method name="frobateStuff">
- <arg type="a{sv}" direction="in"/>
- <arg type="a{sv}" direction="out"/>
-</method>
-<method name="alwaysThrowException">
- <arg type="a{sv}" direction="in"/>
- <arg type="a{sv}" direction="out"/>
-</method>
-<method name="thisDoesNotExist"/>
-<method name="noInParameter">
- <arg type="s" direction="out"/>
-</method>
-<method name="multipleInArgs">
- <arg type="i" direction="in"/>
- <arg type="i" direction="in"/>
- <arg type="i" direction="in"/>
- <arg type="i" direction="in"/>
- <arg type="i" direction="in"/>
- <arg type="s" direction="out"/>
-</method>
-<method name="noReturnValue"/>
-<method name="emitSignal"/>
-<method name="multipleOutValues">
- <arg type="s" direction="out"/>
- <arg type="s" direction="out"/>
- <arg type="s" direction="out"/>
-</method>
-<method name="oneArrayOut">
- <arg type="as" direction="out"/>
-</method>
-<method name="arrayOfArrayOut">
- <arg type="aas" direction="out"/>
-</method>
-<method name="multipleArrayOut">
- <arg type="as" direction="out"/>
- <arg type="as" direction="out"/>
-</method>
-<method name="arrayOutBadSig">
- <arg type="i" direction="out"/>
-</method>
-<method name="byteArrayEcho">
- <arg type="ay" direction="in"/>
- <arg type="ay" direction="out"/>
-</method>
-<method name="byteEcho">
- <arg type="y" direction="in"/>
- <arg type="y" direction="out"/>
-</method>
-<method name="dictEcho">
- <arg type="a{sv}" direction="in"/>
- <arg type="a{sv}" direction="out"/>
-</method>
-<method name="echo">
- <arg type="s" direction="in"/>
- <arg type="i" direction="in"/>
- <arg type="s" direction="out"/>
- <arg type="i" direction="out"/>
-</method>
-<method name="structArray">
- <arg type="a(ii)" direction="out"/>
-</method>
-<signal name="signalFoo">
- <arg type="s" direction="out"/>
-</signal>
-<property name="PropReadOnly" type="b" access="read" />
-<property name="PropWriteOnly" type="s" access="write" />
-<property name="PropReadWrite" type="v" access="readwrite" />
-</interface>
+var TestIface = '<node> \
+<interface name="org.gnome.gjs.Test"> \
+<method name="nonJsonFrobateStuff"> \
+ <arg type="i" direction="in"/> \
+ <arg type="s" direction="out"/> \
+</method> \
+<method name="frobateStuff"> \
+ <arg type="a{sv}" direction="in"/> \
+ <arg type="a{sv}" direction="out"/> \
+</method> \
+<method name="alwaysThrowException"> \
+ <arg type="a{sv}" direction="in"/> \
+ <arg type="a{sv}" direction="out"/> \
+</method> \
+<method name="thisDoesNotExist"/> \
+<method name="noInParameter"> \
+ <arg type="s" direction="out"/> \
+</method> \
+<method name="multipleInArgs"> \
+ <arg type="i" direction="in"/> \
+ <arg type="i" direction="in"/> \
+ <arg type="i" direction="in"/> \
+ <arg type="i" direction="in"/> \
+ <arg type="i" direction="in"/> \
+ <arg type="s" direction="out"/> \
+</method> \
+<method name="noReturnValue"/> \
+<method name="emitSignal"/> \
+<method name="multipleOutValues"> \
+ <arg type="s" direction="out"/> \
+ <arg type="s" direction="out"/> \
+ <arg type="s" direction="out"/> \
+</method> \
+<method name="oneArrayOut"> \
+ <arg type="as" direction="out"/> \
+</method> \
+<method name="arrayOfArrayOut"> \
+ <arg type="aas" direction="out"/> \
+</method> \
+<method name="multipleArrayOut"> \
+ <arg type="as" direction="out"/> \
+ <arg type="as" direction="out"/> \
+</method> \
+<method name="arrayOutBadSig"> \
+ <arg type="i" direction="out"/> \
+</method> \
+<method name="byteArrayEcho"> \
+ <arg type="ay" direction="in"/> \
+ <arg type="ay" direction="out"/> \
+</method> \
+<method name="byteEcho"> \
+ <arg type="y" direction="in"/> \
+ <arg type="y" direction="out"/> \
+</method> \
+<method name="dictEcho"> \
+ <arg type="a{sv}" direction="in"/> \
+ <arg type="a{sv}" direction="out"/> \
+</method> \
+<method name="echo"> \
+ <arg type="s" direction="in"/> \
+ <arg type="i" direction="in"/> \
+ <arg type="s" direction="out"/> \
+ <arg type="i" direction="out"/> \
+</method> \
+<method name="structArray"> \
+ <arg type="a(ii)" direction="out"/> \
+</method> \
+<signal name="signalFoo"> \
+ <arg type="s" direction="out"/> \
+</signal> \
+<property name="PropReadOnly" type="b" access="read" /> \
+<property name="PropWriteOnly" type="s" access="write" /> \
+<property name="PropReadWrite" type="v" access="readwrite" /> \
+</interface> \
+</node>';
/* Test is the actual object exporting the dbus methods */
function Test() {
diff --git a/modules/overrides/Gio.js b/modules/overrides/Gio.js
index 8f543ef..fb3d372 100644
--- a/modules/overrides/Gio.js
+++ b/modules/overrides/Gio.js
@@ -222,23 +222,7 @@ function _newNodeInfo(constructor, value) {
}
function _newInterfaceInfo(value) {
- var xml;
- if (typeof value == 'string')
- xml = new XML(value);
- else if (value instanceof XML)
- xml = value;
- else
- throw TypeError('Invalid type ' + Object.prototype.toString.call(value));
-
- var node;
- if (xml.name() == 'interface') {
- // wrap inside a node
- node = <node/>;
- node.node += xml;
- } else
- node = xml;
-
- var nodeInfo = Gio.DBusNodeInfo.new_for_xml(node);
+ var nodeInfo = Gio.DBusNodeInfo.new_for_xml(value);
return nodeInfo.interfaces[0];
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]