telepathy: Use string.replace in a way compatible with newer Spidermonkey
The semantics of the first argument changed from literal -> regexp if the 'g' option was specified. To remove ambiguity, stop using the spidermonkey extension and create a standard RegExp object. https://bugzilla.gnome.org/show_bug.cgi?id=630539
This commit is contained in:
parent
11db188fe9
commit
e22fbda689
@ -17,13 +17,13 @@ function makeProxyClass(iface) {
|
||||
}
|
||||
|
||||
function nameToPath(name) {
|
||||
return '/' + name.replace('.', '/', 'g');
|
||||
return '/' + name.replace(/\./g, '/');
|
||||
};
|
||||
|
||||
function pathToName(path) {
|
||||
if (path[0] != '/')
|
||||
throw new Error('not a D-Bus path: ' + path);
|
||||
return path.substr(1).replace('/', '.', 'g');
|
||||
return path.substr(1).replace(/\//g, '.');
|
||||
};
|
||||
|
||||
// This is tp_escape_as_identifier() from telepathy-glib
|
||||
|
Loading…
Reference in New Issue
Block a user