Bug 40110 - [Qt] QScriptValue::equals problems
Summary: [Qt] QScriptValue::equals problems
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jędrzej Nowacki
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks: 31863
  Show dependency treegraph
 
Reported: 2010-06-03 03:23 PDT by Jędrzej Nowacki
Modified: 2010-06-04 00:54 PDT (History)
3 users (show)

See Also:


Attachments
Fix v1 (78.02 KB, patch)
2010-06-03 04:48 PDT, Jędrzej Nowacki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jędrzej Nowacki 2010-06-03 03:23:56 PDT
There are a few edge cases for which the method returns a bad result;

!.  Comparison of a two NaN
2.  Comparison of a two invalid QScriptValue objects will return false instead of true
3.  Sometimes QScriptValue::equals print warnings about an invalid engine assignment, but these message are false positive.
Comment 1 Jędrzej Nowacki 2010-06-03 04:48:10 PDT
Created attachment 57753 [details]
Fix v1
Comment 2 Kenneth Rohde Christiansen 2010-06-03 05:11:54 PDT
Comment on attachment 57753 [details]
Fix v1

Wonderful tests.
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:1124
 +          equals.reserve(1085);
Could this number be calculated?
Comment 3 Jędrzej Nowacki 2010-06-03 05:54:48 PDT
(In reply to comment #2)
> (From update of attachment 57753 [details])
> Wonderful tests.
> JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:1124
>  +          equals.reserve(1085);
> Could this number be calculated?

Not really, only the maximal size could be calculated which is permutation of all values in the test. It would be huge.

Thanks for review!
Comment 4 WebKit Commit Bot 2010-06-04 00:54:32 PDT
Comment on attachment 57753 [details]
Fix v1

Clearing flags on attachment: 57753

Committed r60661: <http://trac.webkit.org/changeset/60661>
Comment 5 WebKit Commit Bot 2010-06-04 00:54:37 PDT
All reviewed patches have been landed.  Closing bug.