[EFL] fast/frames/frame-crash-with-page-cache.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=85879

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-05-17
Reviewed by Noam Rosenthal.

Source/WebKit/efl:

_ewk_frame_smart_del() is considering now that the frame can be present in cache.
loader()->detachFromParent() is only applied for the main frame.
loader()->cancelAndClear() is not used anymore.

* ewk/ewk_frame.cpp:
(_ewk_frame_smart_del):

LayoutTests:

* platform/efl/test_expectations.txt: Removed fast/frames/frame-crash-with-page-cache.html.

git-svn-id: svn://svn.chromium.org/blink/trunk@117409 bbb929c8-8fbe-4397-9dbb-9b2b20218538
char* ewk_frame_script_execute(Evas_Object* ewkFrame, const char* script)
{
    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(script, 0);

#if USE(JSC)
    WTF::String resultString;
    JSC::JSValue result = smartData->frame->script()->executeScript(WTF::String::fromUTF8(script), true).jsValue();

    if (!smartData->frame) // In case the script removed our frame from the page.
        return 0;

    if (!result || (!result.isBoolean() && !result.isString() && !result.isNumber()))
        return 0;

    JSC::JSLock lock(JSC::SilenceAssertionsOnly);
    JSC::ExecState* exec = smartData->frame->script()->globalObject(WebCore::mainThreadNormalWorld())->globalExec();
    resultString = WebCore::ustringToString(result.toString(exec)->value(exec));
    return strdup(resultString.utf8().data());
#else
    notImplemented();
    return 0;
#endif
}

char* ewk_frame_script_execute(Evas_Object* ewkFrame, const char* script)
{
    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(script, 0);

#if USE(JSC)
    WTF::String resultString;
    JSC::JSValue result = smartData->frame->script()->executeScript(WTF::String::fromUTF8(script), true).jsValue();

    if (!smartData->frame) // In case the script removed our frame from the page.
        return 0;

    if (!result || (!result.isBoolean() && !result.isString() && !result.isNumber()))
        return 0;

    JSC::JSLock lock(JSC::SilenceAssertionsOnly);
    JSC::ExecState* exec = smartData->frame->script()->globalObject(WebCore::mainThreadNormalWorld())->globalExec();
    resultString = WebCore::ustringToString(result.toString(exec)->value(exec));
    return strdup(resultString.utf8().data());
#else
    notImplemented();
    return 0;
#endif
}
