New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tricky inheritance issue with FF 29 #195
Comments
I forgot to mention : doesn't happen if firebug (or dev console) is opened. I believe firebug accesses the created objects in some way ; that's why, i added "Object.keys()" to fix, it may do the same kind of stuff internally. |
@Gruikmusic , interesting bug, did you post a report at bugzilla.mozilla.org ?
|
i prefered to let you (prototypejs contributors) report to mozilla when found whether it's related to firefox or prototypejs |
@Gruikmusic , so you have to wait prototypejs contributors to do this.... |
I reported to mozilla https://bugzilla.mozilla.org/show_bug.cgi?id=1008339 About derived methods in constructor, I'm used to do this in PHP and I find it interesting : class Parent
{
public function __construct($params)
{
// [...]
$this->_initSomeStuff();
$this->_initOtherStuff();
// [...]
}
protected function _initSomeStuff()
{
// default code
}
protected function _initOtherStuff()
{
// default code
}
} _initSomeStuff and _initOtherStuff may be overridden then in subclasses to customize some parts of initialization while keeping a common construction (and a common constructor signature) |
good.
But in javascript the sequence of property assignments affects the "class" of an object. |
Looks like Firefox fixed this, which is good, because I wouldn't have known where to start. Thanks! |
Hi,
We have a bug that appeared with Firefox 29 : some property in one object is lost when calling a redefined method.
The conditions to reproduce are very particular but I identified them. Maybe it may lead to identify a bigger problem.
Here is the code
The text was updated successfully, but these errors were encountered: