Bug 124212 - Modifying RTCSessionDescription object construction to match the spec
Summary: Modifying RTCSessionDescription object construction to match the spec
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Thiago de Barros Lacerda
URL:
Keywords:
Depends on:
Blocks: 124288
  Show dependency treegraph
 
Reported: 2013-11-12 10:48 PST by Thiago de Barros Lacerda
Modified: 2013-11-13 18:54 PST (History)
12 users (show)

See Also:


Attachments
Patch (16.28 KB, patch)
2013-11-12 10:53 PST, Thiago de Barros Lacerda
no flags Details | Formatted Diff | Diff
Rebased patch (16.46 KB, patch)
2013-11-13 08:11 PST, Thiago de Barros Lacerda
eric.carlson: review+
Details | Formatted Diff | Diff
Patch (16.39 KB, patch)
2013-11-13 11:48 PST, Thiago de Barros Lacerda
no flags Details | Formatted Diff | Diff
Patch for landing (20.31 KB, patch)
2013-11-13 12:30 PST, Thiago de Barros Lacerda
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago de Barros Lacerda 2013-11-12 10:48:16 PST
According to the spec the RTCSessionDescriptionInit parameter in RTCSessionDescription constructor is optional, which must not be nullable.
If the 'type' and 'sdp' keys are not present, the string object that stores them in the RTCSessionDescription class, must be null in those cases.
Also, if an object that is not a Dictionary is passed as argument to the constructor, an exception must be raised.
Comment 1 Thiago de Barros Lacerda 2013-11-12 10:53:13 PST
Created attachment 216694 [details]
Patch
Comment 2 Thiago de Barros Lacerda 2013-11-12 10:54:06 PST
This patch needs the hash generated by xcode, to put the new added file in xcode project files
Comment 3 Thiago de Barros Lacerda 2013-11-13 08:11:49 PST
Created attachment 216803 [details]
Rebased patch
Comment 4 Eric Carlson 2013-11-13 10:03:34 PST
Comment on attachment 216803 [details]
Rebased patch

View in context: https://bugs.webkit.org/attachment.cgi?id=216803&action=review

> Source/WebCore/ChangeLog:13
> +        According to the spec the RTCSessionDescriptionInit parameter in RTCSessionDescription constructor is optional,
> +        which must not be nullable.
> +        If the 'type' and/or 'sdp' keys are not present, the string object that stores them in the
> +        RTCSessionDescription class, must be null in those cases.
> +        Also, if an object that is not a Dictionary is passed as argument to the constructor, an exception must be
> +        raised.

Nit: I don't think the line breaks after each sentence aid readability. I would remove them.

> Source/WebCore/bindings/js/JSRTCSessionDescriptionCustom.cpp:46
> +            return throwVMError(exec, createTypeError(exec, "Optional description init argument of RTCSessionDescription must be a valid Dictionary"));

Nit: I would change this to "Optional RTCSessionDescription constructor argument must be a valid Dictionary"
Comment 5 Thiago de Barros Lacerda 2013-11-13 11:48:04 PST
Created attachment 216829 [details]
Patch
Comment 6 Thiago de Barros Lacerda 2013-11-13 11:48:41 PST
Eric, could you send me the patch to apply in xcode build files?
Comment 7 Thiago de Barros Lacerda 2013-11-13 12:30:26 PST
Created attachment 216841 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2013-11-13 13:24:43 PST
Comment on attachment 216841 [details]
Patch for landing

Clearing flags on attachment: 216841

Committed r159230: <http://trac.webkit.org/changeset/159230>