Last Comment Bug 774556 - Remove nsIDOMWindowPerformance* XPCOM interfaces
: Remove nsIDOMWindowPerformance* XPCOM interfaces
Status: RESOLVED FIXED
: dev-doc-needed
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla17
Assigned To: :Ehsan Akhgari
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-16 19:42 PDT by :Ehsan Akhgari
Modified: 2012-07-18 05:58 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (v1) (21.73 KB, patch)
2012-07-16 19:46 PDT, :Ehsan Akhgari
bzbarsky: feedback+
Details | Diff | Splinter Review
Patch (v1) (21.12 KB, patch)
2012-07-16 21:18 PDT, :Ehsan Akhgari
bzbarsky: review+
Details | Diff | Splinter Review

Description :Ehsan Akhgari 2012-07-16 19:42:34 PDT
This is a follow-up to bug 749101.  We don't have any native code which depends on these interfaces, so we should just kill them.
Comment 1 :Ehsan Akhgari 2012-07-16 19:46:24 PDT
Created attachment 642840 [details] [diff] [review]
Patch (v1)

This patch removes these interfaces, but with it, window.performance returns undefined.  I guess that happens because nsIDOMWindow::GetPerformance now returns an nsISupports*.  Boris, do you know what I need to do in order to fix that?
Comment 2 Boris Zbarsky [:bz] 2012-07-16 20:23:53 PDT
Comment on attachment 642840 [details] [diff] [review]
Patch (v1)

This looks fine in general.  The undefined bit is due to this change:

-  DOM_CLASSINFO_MAP_CONDITIONAL_ENTRY(nsIDOMWindowPerformance,                 \
-                                      nsGlobalWindow::HasPerformanceSupport()) \

which makes Window not implement that interface as far as script is concerned.  You should revert it that part.
Comment 3 :Ehsan Akhgari 2012-07-16 20:53:06 PDT
(In reply to comment #2)
> Comment on attachment 642840 [details] [diff] [review]
>   --> https://bugzilla.mozilla.org/attachment.cgi?id=642840
> Patch (v1)
> 
> This looks fine in general.  The undefined bit is due to this change:
> 
> -  DOM_CLASSINFO_MAP_CONDITIONAL_ENTRY(nsIDOMWindowPerformance,                
> \
> -                                      nsGlobalWindow::HasPerformanceSupport())
> \
> 
> which makes Window not implement that interface as far as script is concerned. 
> You should revert it that part.

I tried to put that part back in using nsISupports, but window.performance is still undefined...
Comment 4 :Ehsan Akhgari 2012-07-16 20:56:14 PDT
(In reply to comment #2)
> Comment on attachment 642840 [details] [diff] [review]
>   --> https://bugzilla.mozilla.org/attachment.cgi?id=642840
> Patch (v1)
> 
> This looks fine in general.  The undefined bit is due to this change:
> 
> -  DOM_CLASSINFO_MAP_CONDITIONAL_ENTRY(nsIDOMWindowPerformance,                
> \
> -                                      nsGlobalWindow::HasPerformanceSupport())
> \
> 
> which makes Window not implement that interface as far as script is concerned. 
> You should revert it that part.

I tried to put that part back in using nsISupports, but window.performance is still undefined...
Comment 5 Boris Zbarsky [:bz] 2012-07-16 21:07:51 PDT
Just put it back exactly the way it was.  nsIDOMWindowPerformance is not one of the interfaces you're removing...
Comment 6 :Ehsan Akhgari 2012-07-16 21:18:54 PDT
Created attachment 642859 [details] [diff] [review]
Patch (v1)

Oops, you're right!
Comment 7 Boris Zbarsky [:bz] 2012-07-16 21:40:32 PDT
Comment on attachment 642859 [details] [diff] [review]
Patch (v1)

It might not be a bad idea to put the constants in the mozilla::dom::PerformanceNavigation namespace or the nsPerformanceNavigation class or something.

r=me
Comment 9 Ed Morley [:emorley] 2012-07-18 05:58:03 PDT
https://hg.mozilla.org/mozilla-central/rev/b722257d15b3

Note You need to log in before you can comment on or make changes to this bug.