Closed Bug 735305 Opened 13 years ago Closed 13 years ago

Update WebTelephony impl to use the new DOMEventTargetHelper API

Categories

(Core :: DOM: Device Interfaces, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: smaug, Assigned: fabrice)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Summary: Update B2G EventTarget objects to use changed DOMEventTargetHelper API → Update B2G EventTarget objects to use the new DOMEventTargetHelper API
smaug, which ones are you specifically talking about?
Ask fabrice. I'm not familiar with b2g code, but apparently there are some classes which extend nsDOMEventTargetHelper.
Attached patch patch (obsolete) (deleted) — Splinter Review
This patch fixes the build issues, but I'm not sure *at all* it's doing the right thing.
Attachment #605466 - Flags: feedback?(bugs)
Comment on attachment 605466 [details] [diff] [review] patch >+++ b/dom/telephony/Telephony.h >@@ -118,16 +118,12 @@ public: > return mRIL; > } > >- nsPIDOMWindow* >- Owner() const >+ nsIScriptContext* >+ ScriptContext() > { >- return mOwner; >- } >- >- nsIScriptContext* >- ScriptContext() const >- { >- return mScriptContext; >+ nsresult rv; >+ nsIScriptContext* sc = GetContextForEventHandlers(&rv); >+ return sc; > } I don't know why you some times use GetContextForEventHandlers, and yet have this helper method. > > nsRefPtr<TelephonyCall> call = new TelephonyCall(); > >- call->mOwner = aTelephony->Owner(); >- call->mScriptContext = aTelephony->ScriptContext(); > call->mTelephony = aTelephony; > call->mNumber = aNumber; You don't bind the object to owner?
Attachment #605466 - Flags: feedback?(bugs) → feedback+
Attached patch patch v2 (deleted) — Splinter Review
updated patch, thanks Olli for the quick review on the first one!
Assignee: nobody → fabrice
Attachment #605466 - Attachment is obsolete: true
Attachment #605475 - Flags: review?(bugs)
Attachment #605475 - Flags: review?(bent.mozilla)
Attachment #605475 - Flags: review?(bugs) → review+
Blocks: webtelephony
Component: General → DOM: Device Interfaces
Product: Boot2Gecko → Core
QA Contact: general → device-interfaces
Summary: Update B2G EventTarget objects to use the new DOMEventTargetHelper API → Update WebTelephony impl to use the new DOMEventTargetHelper API
Blocks: 719491
Comment on attachment 605475 [details] [diff] [review] patch v2 Review of attachment 605475 [details] [diff] [review]: ----------------------------------------------------------------- r=me with this addressed: ::: dom/telephony/Telephony.cpp @@ +329,5 @@ > } > > + nsresult rv; > + nsIScriptContext* sc = GetContextForEventHandlers(&rv); > + if (NS_SUCCEEDED(rv) && sc) { Why not do NS_ENSURE_SUCCESS(rv, rv) here? @@ +346,5 @@ > JSObject* calls = mCallsArray; > if (!calls) { > + nsresult rv; > + nsIScriptContext* sc = GetContextForEventHandlers(&rv); > + if (NS_SUCCEEDED(rv) && sc) { Here too.
Attachment #605475 - Flags: review?(bent.mozilla) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: