mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-23 21:03:08 +09:00
Bug 1263935 - Expose native version of mapURIToAddonId via amIAddonPathService
Issue #102
This commit is contained in:
parent
9feb54bfda
commit
a055ca91ec
2 changed files with 18 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue