[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 03:58:06 PST 2012


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





--- Comment #4 from Hao Zheng <zhenghao at chromium.org>  2012-02-23 03:58:05 PST ---
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;

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

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);
  }

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