Closed Bug 692988 Opened 13 years ago Closed 13 years ago

anp_system_getApplicationDataDirectory() is just plain wrong

Categories

(Core Graveyard :: Plug-ins, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: blassey, Assigned: snorp)

Details

Attachments

(1 file)

this function should return a directory where the plugin can store data. Currently this can return a directory that doesn't exist (it just uses the MOZ_APP_NAME to construct the path) and if it does exist it is the top of our data dir, which is probably bad
It looks like stock browser might use /data/data/<package>/app_plugins/<plugin_package>, so I'll try to make that work.
Attachment #574477 - Flags: review?(blassey.bugs)
Comment on attachment 574477 [details] [diff] [review]
Give Flash a valid application directory

Review of attachment 574477 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/plugins/base/android/ANPSystem.cpp
@@ +58,5 @@
> +    dir = getenv("ANDROID_PLUGIN_DATADIR");
> +  }
> +
> +  LOG("getApplicationDataDirectory return %s", dir);
> +  return dir;

this should be <pluginDir>/<plugin-package>
Attachment #574477 - Flags: review?(blassey.bugs) → review-
(In reply to Brad Lassey [:blassey] from comment #3)
> Comment on attachment 574477 [details] [diff] [review] [diff] [details] [review]
> Give Flash a valid application directory
> 
> Review of attachment 574477 [details] [diff] [review] [diff] [details] [review]:
> -----------------------------------------------------------------
> 
> ::: dom/plugins/base/android/ANPSystem.cpp
> @@ +58,5 @@
> > +    dir = getenv("ANDROID_PLUGIN_DATADIR");
> > +  }
> > +
> > +  LOG("getApplicationDataDirectory return %s", dir);
> > +  return dir;
> 
> this should be <pluginDir>/<plugin-package>

As discussed on IRC, this function takes no arguments so I think it's working as designed. There is nothing to tie it to an instance, so the toplevel path is all we can return (and WebKit does basically the same thing).
Comment on attachment 574477 [details] [diff] [review]
Give Flash a valid application directory

after talking to snorp on irc, the flash plugin is creating its own subdir with its package name.
Attachment #574477 - Flags: review- → review+
https://hg.mozilla.org/projects/birch/rev/151de04e6bd6
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.