Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: Source/modules/mediastream/RTCPeerConnection.cpp

Issue 120063002: Improve modules' TypeError exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/indexeddb/IDBTransaction.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 497 }
498 498
499 PassRefPtr<RTCDTMFSender> RTCPeerConnection::createDTMFSender(PassRefPtr<MediaSt reamTrack> prpTrack, ExceptionState& exceptionState) 499 PassRefPtr<RTCDTMFSender> RTCPeerConnection::createDTMFSender(PassRefPtr<MediaSt reamTrack> prpTrack, ExceptionState& exceptionState)
500 { 500 {
501 if (m_signalingState == SignalingStateClosed) { 501 if (m_signalingState == SignalingStateClosed) {
502 exceptionState.throwUninformativeAndGenericDOMException(InvalidStateErro r); 502 exceptionState.throwUninformativeAndGenericDOMException(InvalidStateErro r);
503 return 0; 503 return 0;
504 } 504 }
505 505
506 if (!prpTrack) { 506 if (!prpTrack) {
507 exceptionState.throwUninformativeAndGenericTypeError(); 507 exceptionState.throwTypeError("The MediaStreamTrack provided is invalid. ");
508 return 0; 508 return 0;
509 } 509 }
510 510
511 RefPtr<MediaStreamTrack> track = prpTrack; 511 RefPtr<MediaStreamTrack> track = prpTrack;
512 512
513 if (!hasLocalStreamWithTrackId(track->id())) { 513 if (!hasLocalStreamWithTrackId(track->id())) {
514 exceptionState.throwUninformativeAndGenericDOMException(SyntaxError); 514 exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
515 return 0; 515 return 0;
516 } 516 }
517 517
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 events.swap(m_scheduledEvents); 686 events.swap(m_scheduledEvents);
687 687
688 Vector<RefPtr<Event> >::iterator it = events.begin(); 688 Vector<RefPtr<Event> >::iterator it = events.begin();
689 for (; it != events.end(); ++it) 689 for (; it != events.end(); ++it)
690 dispatchEvent((*it).release()); 690 dispatchEvent((*it).release());
691 691
692 events.clear(); 692 events.clear();
693 } 693 }
694 694
695 } // namespace WebCore 695 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBTransaction.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698