[Webkit-unassigned] [Bug 40835] Adds support for throwing behavior of SerializedScriptValue to be specified in the IDL.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 29 10:29:59 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=40835





--- Comment #29 from Marcus Bulach <bulach at chromium.org>  2010-06-29 10:29:59 PST ---
(In reply to comment #26)
> (From update of attachment 59888 [details])
> LayoutTests/storage/indexeddb/script-tests/idb-add-serialized-script-value.js:8
>  +      verifyErrorEvent(event);
> Assert that we're raising a serialization error?  Or...make a fixme to do this, since it probably doesn't work right today.  :-)
yeah, there was a FIXME further down where I'm short-circuiting this :)
but good point, added another one here.


> 
> LayoutTests/storage/indexeddb/script-tests/idb-add-serialized-script-value.js:18
>  +      var a = {};
> Maybe make a function in the shared script for this?  createUnserializableValue()  ?
done.

> 
> LayoutTests/storage/indexeddb/script-tests/idb-add-serialized-script-value.js:23
>  +          testFailed("objStore.add threw an unexpected exception: " + err);
> And then notify done + return?
done.

> 
> WebCore/bindings/js/SerializedScriptValue.cpp:972
>  +      PassRefPtr<SerializedScriptValue> serializedValue = new SerializedScriptValue(SerializedScriptValueData::serialize(exec, value));
> This should be a RefPtr...later return serializedValue.release();
done.

> 
> WebCore/bindings/js/SerializedScriptValue.cpp:990
>  +      } else {
> No {}'s on the second half
done.

> 
> WebCore/bindings/scripts/test/TestPODObj.idl:13
>  +   * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
> Just use a 2 clause license.
sigh, I'll keep this in mind when copying from somewhere else next time.. thanks!

> 
> WebCore/bindings/scripts/test/TestPODObj.idl:2
>  +   * Copyright (C) 2009 Google Inc. All rights reserved.
> 2010
copy the whole license from somewhere else.

> 
> WebCore/bindings/scripts/test/TestPODObj.idl:34
>  +                   attribute [ConvertNullToNullString] DOMString stringAttr;
> Not sure this indenting is necessary.
removed.

> 
> WebCore/bindings/scripts/test/TestObj.idl:65
>  +          // Test various forms of SerializedScriptValue
> period at end.
done.

> 
> WebCore/bindings/scripts/test/JS/JSTestObj.cpp:798
>  +      RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(exec, exec->argument(0), &ec);
> Hmm...do we need to generate bail out code for if ec is !0?
no idea.. :( won't the setDOMException() below take care of it?

> WebCore/bindings/scripts/test/JS/JSTestObj.cpp:828
>  +      JSC::JSValue result = imp->serializedValueReturnRaises(ec) ? imp->serializedValueReturnRaises(ec)->deserialize(exec, castedThis->globalObject()) : jsNull();
> Hu?  This seems very not right.  :-)
> At least make sure the bindings generator kills itself rather than emit stuff like this.

fixed. getting imp->serializedValueReturn[Raises|NoRaise]() as a temp, and then testing it (plus ec, if available), and returning jsNull() instead.
note that this code would call the function twice, but wasn't intrinsically wrong AFAICT, since the function that returns the serializedValue should be const anyway..

oh, the joys of perl. :) would please double check the generator bits as well? thanks!

> 
> WebCore/bindings/scripts/test/JS/JSTestObj.cpp:842
>  +      JSC::JSValue result = imp->serializedValueReturnNoRaise() ? imp->serializedValueReturnNoRaise()->deserialize(exec, castedThis->globalObject()) : jsNull();
> ditto

fixed as above..

-- 
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