[Streams API] Error storage should be moved from source to stream/reader
[WebKit-https.git] / Source / WebCore / bindings / js / ReadableStreamJSSource.cpp
index a88c038d9750e83e1430e89e71a66d4500717b5b..d8f7fb4eeff43ba6f1dcf4ea6bf41da92207eb36 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "JSDOMPromise.h"
 #include "JSReadableStream.h"
+#include "NotImplemented.h"
 #include <runtime/Error.h>
 #include <runtime/JSCJSValueInlines.h>
 #include <runtime/JSString.h>
@@ -68,21 +69,15 @@ Ref<ReadableStreamJSSource> ReadableStreamJSSource::create(JSC::ExecState* exec)
 
 ReadableStreamJSSource::ReadableStreamJSSource(JSC::ExecState* exec)
 {
-    if (!exec->argumentCount())
-        return;
-
-    if (!exec->argument(0).isObject()) {
-        setInternalError(exec, ASCIILiteral("ReadableStream constructor should get an object as argument."));
-        return;
+    if (exec->argumentCount()) {
+        ASSERT(exec->argument(0).isObject());
+        // FIXME: Implement parameters support;
     }
-
-    // FIXME: Implement parameters support
-    setInternalError(exec, ASCIILiteral("ReadableStream constructor does not support parameter yet."));
 }
 
-void ReadableStreamJSSource::setInternalError(JSC::ExecState* exec, const String& message)
+void ReadableStreamJSSource::start(JSC::ExecState*)
 {
-    m_error.set(exec->vm(), createTypeError(exec, message));
+    notImplemented();
 }
 
 } // namespace WebCore