[Webkit-unassigned] [Bug 65972] [EFL] update ewk_frame_script_execute to return the result for JavaScript
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 10 23:12:48 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=65972
--- Comment #5 from Jongseok Yang <js45.yang at samsung.com> 2011-08-10 23:12:48 PST ---
(In reply to comment #4)
> (From update of attachment 103464 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=103464&action=review
>
> Does return value have success or fail message? Could you explain what can application does with the return value ?
I doest not think that it have success or fail message. Because it returns NULL pointer in specific case like the below code.
=====================================================================================
if (!sd->frame) // In case the script removed our frame from the page.
return 0;
if (!result || (!result.isBoolean() && !result.isString() && !result.isNumber()))
return 0;
=====================================================================================
To identify return value, it's helpfull to check "toString" function.
<Source/JavaScriptCore/runtime/JSString.h>=========================
inline UString JSValue::toString(ExecState* exec) const
{
if (isString())
return static_cast<JSString*>(asCell())->value(exec);
if (isInt32())
return exec->globalData().numericStrings.add(asInt32());
if (isDouble())
return exec->globalData().numericStrings.add(asDouble());
if (isTrue())
return "true";
if (isFalse())
return "false";
if (isNull())
return "null";
if (isUndefined())
return "undefined";
ASSERT(isCell());
return asCell()->toString(exec);
}
===================================================================
>From "toString" function, you may require to change the code like the below
=====================================================================================
<before>
if (!result || (!result.isBoolean() && !result.isString() && !result.isNumber()))
return 0;
<after>
if (!result)
return 0;
=====================================================================================
I'll wait for your proposal.
>
> > Source/WebKit/efl/ewk/ewk_frame.cpp:426
> > +char *ewk_frame_script_execute(Evas_Object* o, const char* script)
>
> Move '*' operator to parameter side.
I'll fix that.
>
> > Source/WebKit/efl/ewk/ewk_frame.cpp:441
> > + JSC::JSLock lock(JSC::SilenceAssertionsOnly);
>
> You need to use #if USE(JSC) preprocessor. We may use V8 as JavaScriptEngine in future.
I'll fix that.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list