[Webkit-unassigned] [Bug 79222] [chromium] createObjectURL(Blob) throws 'Illegal invocation' error when MEDIA_STREAM is disabled.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 23 09:07:07 PST 2012


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





--- Comment #6 from Erik Arvidsson <arv at chromium.org>  2012-02-23 09:07:07 PST ---
(In reply to comment #4)
> The problem may be caused by the method is changed to static. I'm confused about the static semantics of DOMURL. Let's see Screen.idl. Of course, there is only a single instance of Screen, and we still don't add static to its attributes/methods. And in DOMWindow.idl, it's defined as:
> attribute [Replaceable] Screen screen;
> However, for DOMURL, it's defined as:
> attribute [Conditional=BLOB] DOMURLConstructor webkitURL;
> And it's much like other new-able elements like:
> attribute EventConstructor Event;

URL is going to be constructable real soon. See 74385

> Now that all methods of DOMURL are static, we can treat it as other singleton classes like Screen, Console, etc.

No, screen is just an object (instanceof Object). URL is a constructor (instanceof Function).

> Of course, defining it as static is also fine. But obviously something is wrong. I'm not familiar with idl, but webkitURL is defined as a constructor. Is it right to call static methods on a constructor, rather than the class? In debugging, I found the code when the error happens (builtins.cc HandleApiCallHelper()):
> 
>   Object* raw_holder = TypeCheck(heap, args.length(), &args[0], fun_data);               // <--- TypeCheck failed.
> 
>   if (raw_holder->IsNull()) {
>     // This function cannot be called with the given receiver.  Abort!
>     Handle<Object> obj =
>         isolate->factory()->NewTypeError(
>             "illegal_invocation", HandleVector(&function, 1));
>     return isolate->Throw(*obj);
>   }

This does sound like a bug. More in next reply.

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