As part of the async functions runtime implementation, I had implemented a function in d8.cc which would call isolate->RunMicrotasks() --- but was talked down from doing this because of a worry that it might interfere with certain uses of d8 out in the wild.
So, I went with using the existing %RunMicrotasks runtime function --- but of course this requires a flag to be present, so the mjsunit helpers which rely on this can't be present in mjsunit.js (which means either a lot of code duplication, or worse). What I'd like to do is get a feel for just how dangerous something like `runMicrotasks()` in d8.cc, or if we could get away with adding it as a method of a `TestUtils` or `Utils` object instead. Something that would allow tests which rely on being able to drain the microtask queue (in order to execute quickly, predictably, and synchronously, while still verifying the correct async behaviours), without requiring a --allow-natives-syntax just to parse the script. I don't think there's a huge risk in adding these to d8.cc, and they aren't exposed in v8 itself (or Chromium) --- if you're a user of d8 and you think a global variable named "Utils", "TestUtils", "runMicrotasks", or whatever, would interfere with your uses of d8, I'd like to hear why and how. Hopefully, there's consensus that it's not dangerous to add such a method or object to d8's global object. -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
