Skip to content

getFile in DirectoryEntry takes an Object instead of a Map for Flags #1942

@DartBot

Description

@DartBot

This issue was originally filed by jeffbailey@google.com


What steps will reproduce the problem?

For this snippet of code:

void makeOptionsFile(dom.DOMFileSystem fs) {
  fs.root.getFile('NetHack.cnf', {'create': true}, (var fileEntry) {

frogc and minfrog define the flags object as:

_map(["create", true])

Which in turn gets instantiated as a LinkedHashMapImplementation();

Unfortunately, the implementation of getFile isn't wrapped here, so there's nothing to turn the map into an actual JavaScript object, as is expected by the JS runtime.

getFile then silently ignores the flags (no warnings, no errors at either compile or runtime) and behaves incorrectly.

When I sed the output to actually just have a JS object, everything works as expected.

What version of the product are you using? On what operating system?

Current Dart from today on Goobuntu

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-obsoleteClosed as the reported issue is no longer relevant

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions