Closed Bug 1215429 Opened 5 years ago Closed 5 years ago
[Simulator] Can't access to File object in chrome code of TVSimulator
I added the code of loading video file at bug 1180589. However I forgot importing the File Object to global scope. So current code can't access to video file.
Assignee: nobody → mantaroh
Summary: [Simulator] Can't access to File object in chrome code. → [Simulator] Can't access to File object in chrome code of TVSimulatorService.
Hi Sean, I forgot adding to import statement of File. So current code can't access to the video file. The root cause of bug 1214520 is this issue.
Attachment #8674748 - Flags: review?(selin) → review+
Hi Mantaroh, I also want to fix this issue by |new aWin.File(....)|. But I will get a failure return value(NS_ERROR_FAILURE 0x80004005) at https://dxr.mozilla.org/mozilla-central/rev/d374d16cbb251c9dac5af69f8e186e821ce82fe2/dom/tv/TVTuner.cpp#283 Do you know why I cannot use aWin to access class File? Using the approach of your patch can work fine.... Thanks.
Can we get a try run for this patch?
Hi James, Thank you for confirm. (In reply to James Cheng[:JamesCheng] from comment #2) > Hi Mantaroh, > > I also want to fix this issue by |new aWin.File(....)|. > > But I will get a failure return value(NS_ERROR_FAILURE 0x80004005) at > > https://dxr.mozilla.org/mozilla-central/rev/ > d374d16cbb251c9dac5af69f8e186e821ce82fe2/dom/tv/TVTuner.cpp#283 > > Do you know why I cannot use aWin to access class File? The aWin parameter is content's window, and content can't access the local file. So we can't create File object using aWin parameter. We should access to local file at chrome code using importGlobalProperties.  https://developer.mozilla.org/ja/docs/Extensions/Using_the_DOM_File_API_in_chrome_code best regards.
Hi Wes, (In reply to Wes Kocher (:KWierso) from comment #3) > Can we get a try run for this patch? Of course! https://treeherder.mozilla.org/#/jobs?repo=try&revision=e8ecaf7bd794 However I skipped some test and builds. So I tried full build and tests again. https://treeherder.mozilla.org/#/jobs?repo=try&revision=bf626168d04c
You need to log in before you can comment on or make changes to this bug.