diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-04-29 13:07:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-29 13:07:33 +0200 |
commit | 58a55be1f11fa798b6cc2a4d19eda9deabd1574f (patch) | |
tree | 28f2f4d0b5bd3bcbfdf29f76c8467022076a8ecf /toolkit/mozapps/extensions/AddonPathService.cpp | |
parent | 11caf6ecb3cb8c84d2355a6c6e9580a290147e92 (diff) | |
parent | 77e7fcac500629602059ad573c4ff6a9ff4d93b7 (diff) | |
download | UXP-58a55be1f11fa798b6cc2a4d19eda9deabd1574f.tar UXP-58a55be1f11fa798b6cc2a4d19eda9deabd1574f.tar.gz UXP-58a55be1f11fa798b6cc2a4d19eda9deabd1574f.tar.lz UXP-58a55be1f11fa798b6cc2a4d19eda9deabd1574f.tar.xz UXP-58a55be1f11fa798b6cc2a4d19eda9deabd1574f.zip |
Merge pull request #281 from janekptacijarabaci/pm_devtools_storage_mapURIToAddonId_1
[PALEMOON] [DevTools] Storage inspector throws "AddonPathService.mapURIToAddonId is not a function" when url changes
Diffstat (limited to 'toolkit/mozapps/extensions/AddonPathService.cpp')
-rw-r--r-- | toolkit/mozapps/extensions/AddonPathService.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/toolkit/mozapps/extensions/AddonPathService.cpp b/toolkit/mozapps/extensions/AddonPathService.cpp index 006149100..ddfdbe817 100644 --- a/toolkit/mozapps/extensions/AddonPathService.cpp +++ b/toolkit/mozapps/extensions/AddonPathService.cpp @@ -128,6 +128,16 @@ AddonPathService::InsertPath(const nsAString& path, const nsAString& addonIdStri return NS_OK; } +NS_IMETHODIMP +AddonPathService::MapURIToAddonId(nsIURI* aURI, nsAString& addonIdString) +{ + if (JSAddonId* id = MapURIToAddonID(aURI)) { + JSFlatString* flat = JS_ASSERT_STRING_IS_FLAT(JS::StringOfAddonId(id)); + AssignJSFlatString(addonIdString, flat); + } + return NS_OK; +} + static nsresult ResolveURI(nsIURI* aURI, nsAString& out) { |