Closed Bug 1215429 Opened 9 years ago Closed 9 years ago

[Simulator] Can't access to File object in chrome code of TVSimulatorService.

Categories

(Firefox OS Graveyard :: Simulator, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox44 fixed)

RESOLVED FIXED
FxOS-S10 (30Oct)
Tracking Status
firefox44 --- fixed

People

(Reporter: mantaroh, Assigned: mantaroh)

References

Details

Attachments

(1 file, 1 obsolete file)

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 #8674726 - Attachment is obsolete: true
Attachment #8674748 - Flags: review?(selin)
Attachment #8674748 - Flags: review?(selin) → review+
Keywords: checkin-needed
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?
Keywords: checkin-needed
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[1].

[1] 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
Keywords: checkin-needed
Blocks: 1201451
https://hg.mozilla.org/mozilla-central/rev/8d2a024c6892
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S10 (30Oct)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: