Closed Bug 893004 Opened 11 years ago Closed 11 years ago

Remove Navigator classinfo and most of its XPCOM goop

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(3 files)

Now that bug 838146 is fixed, we can do that.
Depends on: 838146
Attachment #777099 - Flags: review?(bugs)
Comment on attachment 777099 [details] [diff] [review]
part 1.  Remove Navigator classinfo.

Review of attachment 777099 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/nsDOMClassInfo.cpp
@@ -4430,5 @@
> -      // don't need to worry about losing expando properties etc.
> -      if (!::JS_DefinePropertyById(cx, obj, id, v,
> -                                   JS_PropertyStub, JS_StrictPropertyStub,
> -                                   JSPROP_READONLY | JSPROP_PERMANENT |
> -                                   JSPROP_ENUMERATE)) {

Seems like it's unforgeable-ish right now; do we want to change that?
Well, we already changed it, since the code you quote is dead code once we're on WebIDL bindings.

I don't think there's any good reason for window.navigator to be unforgeable.
Er, I'm wrong.  It's not dead code.

I still think there's no good reason to have it be unforgeable.
Comment on attachment 777099 [details] [diff] [review]
part 1.  Remove Navigator classinfo.

Ok, based on Bug 342490 I think this should be ok.
Attachment #777099 - Flags: review?(bugs) → review+
Comment on attachment 777100 [details] [diff] [review]
part 2.  Remove various no-longer-used XPCOM bits from Navigator, except the ones from nsIDOMNavigator.

Could you fix the naming of onsucces

Rename nsIDOMNavigatorNetwork.idl to nsIMozNavigatorNetwork.idl
Attachment #777100 - Flags: review?(bugs) → review+
Comment on attachment 777101 [details] [diff] [review]
part 3.  Remove the unused-from-C++ bits of nsIDOMNavigator, except the ones that share implementation with WebIDL anyway.   that I believe we could remove all these remaining attributes too; it's just some tedious work.

This is a bit risky, but let's try.
Hopefully binary addons devs complain early enough.

Do we have the comment about vibrate() elsewhere? Same with requestWakeLock
Attachment #777101 - Flags: review?(bugs) → review+
> Do we have the comment about vibrate() elsewhere? 

No, because the behavior it describes is no longer what happens, since WebIDL supersedes it.

> Same with requestWakeLock

In Navigator.webidl.
> comm-central bustage fix:

Oy, sorry about that.  :(
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: