Commit 77cb9a9c authored by darin's avatar darin

Reviewed by Maciej.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9031
          REGRESSION: Crash when closing tabs on newegg.com
        - removed a no-longer-needed Win32-specific workaround (not reviewed)

        * bindings/js/kjs_window.cpp: Added include of <wtf/MathExtras.h>.
        (WebCore::floatFeature): Remove WIN32 ifdef around isnan.
        (WebCore::toJS): Add null checks.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9d783fab
2006-06-04 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9031
REGRESSION: Crash when closing tabs on newegg.com
- removed a no-longer-needed Win32-specific workaround (not reviewed)
* bindings/js/kjs_window.cpp: Added include of <wtf/MathExtras.h>.
(WebCore::floatFeature): Remove WIN32 ifdef around isnan.
(WebCore::toJS): Add null checks.
2006-06-04 Darin Adler <darin@apple.com>
Reviewed by Maciej.
......
......@@ -56,7 +56,7 @@
#include "kjs_navigator.h"
#include "kjs_proxy.h"
#include "kjs_traversal.h"
#include <math.h>
#include <wtf/MathExtras.h>
#if KHTML_XSLT
#include "JSXSLTProcessor.h"
......@@ -524,11 +524,7 @@ static float floatFeature(const HashMap<String, String> &features, const char *k
// "0q" should be minimum value.
bool ok;
double d = value.toDouble(&ok);
if ((d == 0 && !ok)
#if !WIN32
|| isnan(d)
#endif
)
if ((d == 0 && !ok) || isnan(d))
return defaultValue;
if (d < min || max <= min)
return min;
......@@ -2485,7 +2481,12 @@ namespace WebCore {
JSValue* toJS(ExecState*, DOMWindow* domWindow)
{
return Window::retrieve(domWindow->frame());
if (!domWindow)
return jsNull();
Frame* frame = domWindow->frame();
if (!frame)
return jsNull();
return Window::retrieve(frame);
}
DOMWindow* toDOMWindow(JSValue* val)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment