diff options
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/perdomainsettings | 4 | ||||
-rw-r--r-- | extensions/requestpolicy | 21 |
2 files changed, 11 insertions, 14 deletions
diff --git a/extensions/perdomainsettings b/extensions/perdomainsettings index 90e95538..e50fca37 100644 --- a/extensions/perdomainsettings +++ b/extensions/perdomainsettings @@ -165,11 +165,11 @@ function onNavigation(wv, frame, request, action) var value; - var o = wv.getPrivate("pds", script); + var o = script.getPrivate(wv, "pds"); if (! o) { o = { webview : wv, defaults : false, settings : wv.settings }; - wv.setPrivate("pds", o, script); + script.setPrivate(wv, "pds"); } o.set = {}; var uri = request.uri; diff --git a/extensions/requestpolicy b/extensions/requestpolicy index 84f7daae..62e1d81e 100644 --- a/extensions/requestpolicy +++ b/extensions/requestpolicy @@ -120,19 +120,16 @@ var sigs = { var persistentList = null; var tmpList = {}; -var getPrivate = (function () +var getPrivate = function (wv) { - var identifier = {}; - return function (wv) { - var p = wv.getPrivate("foo", identifier); - if (!p) - { - p = { domains : [], blocked : 0 }; - wv.setPrivate("foo", p, identifier); - } - return p; - }; -})(); + var p = script.getPrivate(wv, "foo"); + if (!p) + { + p = { domains : [], blocked : 0 }; + script.setPrivate(wv, "foo", p); + } + return p; +}; function listAdd(o, key, value, doWrite) { |