Closed
Bug 996677
Opened 11 years ago
Closed 11 years ago
Incorrect call DeviceRotationRate() ctor from another one
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: maksqwe1, Assigned: smaug)
References
Details
Attachments
(1 file)
1.58 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20140314220517
Steps to reproduce:
./dom/events/DeviceMotionEvent.h 26 & 63
DeviceRotationRate(double aAlpha, double aBeta, double aGamma)
{
DeviceRotationRate(nullptr, Nullable<double>(aAlpha), Nullable<double>(aBeta), Nullable<double>(aGamma));
}
...
DeviceAcceleration(double aX, double aY, double aZ)
{
DeviceAcceleration(nullptr, Nullable<double>(aX), Nullable<double>(aY), Nullable<double>(aZ));
}
Expected results:
Created temp DeviceAcceleration obj and then this obj is deleted.
Possible solutions:
1. add some "init()" method
2. for C++11 call one ctor from another:
DeviceAcceleration(double aX, double aY, double aZ)
: DeviceAcceleration(nullptr, Nullable<double>(aX), Nullable<double>(aY), Nullable<double>(aZ))
{
}
3.
DeviceAcceleration(double aX, double aY, double aZ)
{
this->DeviceAcceleration(nullptr, Nullable<double>(aX), Nullable<double>(aY), Nullable<double>(aZ))
}
It is dangerous because "DeviceAcceleration" not base class
Updated•11 years ago
|
Component: DOM → DOM: Events
Assignee | ||
Comment 2•11 years ago
|
||
I think we can just remove those problematic ctors.
Assignee: nobody → bugs
Assignee | ||
Comment 3•11 years ago
|
||
Builds at least on linux, and mxr didn't find any use of those ctors.
https://tbpl.mozilla.org/?tree=Try&rev=927fa6349968
Attachment #8406994 -
Flags: review?(VYV03354)
Comment 4•11 years ago
|
||
Comment on attachment 8406994 [details] [diff] [review]
patch
The wreckage of the XPCOM interface...
Attachment #8406994 -
Flags: review?(VYV03354) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 5•11 years ago
|
||
Keywords: checkin-needed
Comment 6•11 years ago
|
||
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•