Bug 124212

Summary: Modifying RTCSessionDescription object construction to match the spec
Product: WebKit Reporter: Thiago de Barros Lacerda <thiago.lacerda>
Component: WebCore Misc.Assignee: Thiago de Barros Lacerda <thiago.lacerda>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, eric.carlson, esprehn+autocc, glenn, gyuyoung.kim, hta, jer.noble, kondapallykalyan, pnormand, rakuco, tommyw
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 124288    
Attachments:
Description Flags
Patch
none
Rebased patch
eric.carlson: review+
Patch
none
Patch for landing none

Thiago de Barros Lacerda
Reported 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.
Attachments
Patch (16.28 KB, patch)
2013-11-12 10:53 PST, Thiago de Barros Lacerda
no flags
Rebased patch (16.46 KB, patch)
2013-11-13 08:11 PST, Thiago de Barros Lacerda
eric.carlson: review+
Patch (16.39 KB, patch)
2013-11-13 11:48 PST, Thiago de Barros Lacerda
no flags
Patch for landing (20.31 KB, patch)
2013-11-13 12:30 PST, Thiago de Barros Lacerda
no flags
Thiago de Barros Lacerda
Comment 1 2013-11-12 10:53:13 PST
Thiago de Barros Lacerda
Comment 2 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
Thiago de Barros Lacerda
Comment 3 2013-11-13 08:11:49 PST
Created attachment 216803 [details] Rebased patch
Eric Carlson
Comment 4 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"
Thiago de Barros Lacerda
Comment 5 2013-11-13 11:48:04 PST
Thiago de Barros Lacerda
Comment 6 2013-11-13 11:48:41 PST
Eric, could you send me the patch to apply in xcode build files?
Thiago de Barros Lacerda
Comment 7 2013-11-13 12:30:26 PST
Created attachment 216841 [details] Patch for landing
WebKit Commit Bot
Comment 8 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>
Note You need to log in before you can comment on or make changes to this bug.