Commit graph

254 commits

Author SHA1 Message Date
Sudarsan
4afe49d776 ran mach tidy 2020-08-28 21:01:09 +08:00
Sudarsan
f8c9ee4eff Update mozjs to 0.14.1
This update pulls in improvements on mozjs that now removes the need to
pass pointers to CompileOptionsWraper::new(), allows NewProxyObject to
now accept a Singleton bool and JSClass and removes an unsafe
Handle::new usage.
2020-08-28 20:54:18 +08:00
Kunal Mohan
ce6e09a3aa Change ErrorScopeId type to NonZeroU64
And extract it from WebGPURequest
2020-08-03 01:45:29 +05:30
Kunal Mohan
4e38633009 Refactor and improve GPUErrorScopes
Remove use of equivalent BGLs
2020-07-30 23:36:58 +05:30
Josh Matthews
e3f0989e1c Ensure scripts compiled off-thread can import modules. 2020-07-22 13:10:03 -04:00
AbhishekSharma102
1119dd119e Added off thread compilation
Co-authored-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com>
Co-authored-by: Abhishek Sharma <20724848+AbhishekSharma102@users.noreply.github.com>
2020-07-21 16:20:51 -04:00
bors-servo
086556e706
Auto merge of #27026 - CYBAI:dynamic-module, r=jdm
Introduce dynamic module

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25439
- [x] There are tests for these changes
2020-07-19 09:29:50 -04:00
CYBAI
419cd53561 Use JS_GetScriptPrivate to get a mutated return value
Because MSVC uses a different calling conventions for functions that
return non-POD values, we need to use the new exposed wrapper function
so that `GetScriptPrivate` can be handled correctly on Windows.
2020-07-19 16:24:24 +09:00
Kunal Mohan
785497af63 Ensure GPUDevice cleanup in GlobalScope 2020-07-17 21:17:38 +05:30
CYBAI
08723b0e37 Handle script private reference hooks properly 2020-07-18 00:43:35 +09:00
CYBAI
d1715918f0 Set private reference for classic script
Web developers can use `Dynamic Import` in a classic script; thus, we
need to save the script's private reference so that we can reuse it when
we're going to fetch a dynamic import module for a classic script.

Besides, because it's possible to use different executing context for a
dynamic import module (like `dynamic-import/string-compilation-other-document.html` WPT test),
we can't initialize a module owner at the timing of `SetScriptPrivate`;
thus, if the private module script doesn't hold an owner, we'll use a
DynamicImport owner for it.
2020-07-18 00:43:34 +09:00
CYBAI
99e832a345 Move from direct Evaluate to compile then execute for classic script 2020-07-18 00:43:34 +09:00
Josh Matthews
1aef31bb2f checkpoint - dynamic load inside of a module and classic script works. 2020-07-18 00:43:34 +09:00
Kunal Mohan
0dc1514d57 Implement Async Error reporting for WebGPU and update wgpu-core 2020-07-16 23:21:09 +05:30
bors-servo
cbbbe16936
Auto merge of #27088 - jdm:group, r=ferjm
Implement Console grouping APIs.

These are used by Hubs and other sites we want to run.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #9274
- [x] These changes do not require tests because we can't test stdout content or devtools messages.
2020-07-07 01:24:03 -04:00
Josh Matthews
2d7effddef Implement Console grouping APIs. 2020-07-06 19:36:26 -04:00
Utsav Oza
310821d3b0 Update referrer computation
Update unit tests for determine_requests_referrer

Update wpt metadata

Add missing spec links
2020-07-02 14:29:26 +05:30
Gregory Terzian
44ebca72da ensure clean shutdown of all threads running JS 2020-06-30 13:22:38 +08:00
Matthias Deiml
47355766ed Fix invalid use of ReferrerUrl 2020-06-17 19:07:15 +02:00
Matthias Deiml
fa18cf620f Make url for "client" referrer mandatory 2020-06-17 19:07:14 +02:00
Kunal Mohan
71401e0855 Implement GPUSwapChain and GPUCanvasContext and interface with Webrender 2020-06-13 17:46:12 +05:30
Gregory Terzian
bd5796c90b integrate readablestream with fetch and blob 2020-06-04 11:38:35 +08:00
Gregory Terzian
6f34b52e39 properly shutdown dedicated workers when the owning scope shuts-down 2020-06-03 12:32:45 +08:00
Gregory Terzian
947fa8bbb7 add a control chan to workers, use to signal shutdown 2020-06-03 12:32:47 +08:00
Gregory Terzian
ed688fe2c1 add mechanism to join on service- and dedicated-worker threads 2020-05-29 18:24:47 +08:00
Gregory Terzian
89eb7c2aa2 serviceworker: make job queue unique per origin 2020-05-21 13:21:21 +08:00
Alexandrov Sergey
a7c5c97616 check http_state in determine_request_referrer 2020-05-19 20:06:59 +03:00
Kunal Mohan
e5065c7eb2 Share single gpu_id_hub among all threads in a process 2020-05-15 01:15:01 +05:30
JayalakshmiV
ef6f99d8f5 implemented CreateImageBitmap function for Canvas image source 2020-04-29 21:51:10 -04:00
CYBAI
018b23d43b Use mozjs exposed function to generate SourceText 2020-03-31 22:29:53 +09:00
Anthony Ramine
5a4f8cf93f Update SpiderMonkey 2020-03-06 11:13:28 +01:00
bors-servo
d42835b238
Auto merge of #25869 - iulianR:issue-23057-tinifiledialogs, r=jdm
Move tinyfiledialog call from script to embedder

<!-- Please describe your changes on the following line: -->

PR is based on work started in #23651. I rebased on top of master and addressed review comments. Handling the `PromptPermission` message in `libsimpleservo` is probably not ideal. Looking forward to make more changes, just let me know how I should proceed.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23057 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-02-29 14:52:15 -05:00
Istvan Miklos
000a5d543d Fixing some style related issues in WebGPU.
Changed the Requests/Response from tuples to named struct variants and also sorted in alphabetical order.
Replaced the ID generator functions from `globalscope` with a single function,
which returns a `RefMut` and can call the appropriate method to generate resource IDs.
2020-02-27 15:10:24 +01:00
gatowololo
675b36dde5 Move tinyfiledialog out of script into embedder. 2020-02-27 01:01:08 +02:00
gatowololo
24c14ac94e Factored out permission_state_invocation_results API to GlobalScope
Instead of Window
2020-02-27 00:02:04 +02:00
bors-servo
cd00e57c97
Auto merge of #25740 - gterzian:per_fetch_filemanager_handle, r=Manishearth
Per fetch file token for blob url

<!-- Please describe your changes on the following line: -->

Depends on https://github.com/servo/servo/pull/25724

First step of https://github.com/servo/servo/issues/25226

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-02-25 14:49:26 -05:00
Gregory Terzian
eb21d5f738 implement broadcastchannel 2020-02-25 14:17:48 +08:00
Gregory Terzian
291ab7473d leak message ports in dom, until they are closed 2020-02-22 14:43:30 +08:00
Gregory Terzian
895500e68c add a fetch token for blob urls 2020-02-21 14:26:45 +08:00
CYBAI
403ffcf1eb Always pass InRealm to GlobalScope::from_context to avoid getting null global 2020-02-16 09:55:10 +09:00
Patrick Shaughnessy
e0b768c6cc alphabetized frozen supported entry types on the global, avoid moving Heap into Option 2020-02-14 11:34:51 -05:00
Zakor Gyula
4facd3d4d2 Initial implementation of GPUCommandEncoder
Added WebIDL bindings for `GPUCommandEncoder`, `GPUCommandBuffer`, `GPUComputePassEncoder`, `GPUProgrammablePassEncoder`.
Implemented the `beginComputePass`, `copyBufferToBuffer` and `finish` functions of `GPUCommandEncoder`.
Implemented the `createCommandEncoder` function of `GPUDevice`.
2020-02-11 10:20:34 +01:00
Istvan Miklos
9031369c19 Initial implementation of GPUComputePipeline
Added WebIDL bindings for `GPUComputePipeline`.
Implemented the `createComputePipeline` function of `GPUDevice`.
2020-02-11 10:15:03 +01:00
Istvan Miklos
a8621c4ed9 Initial implementation of GPUShaderModule
Added WebIDL bindings for `GPUShaderModule`.
Implemented the `createShaderModule` function of `GPUDevice`.
2020-02-11 10:12:20 +01:00
bors-servo
1352e7188a
Auto merge of #25637 - szeged:wgpu_crete_bind_group, r=jdm
Initial implementation of GPUBindGroup for WebGPU

Added WebIDL bindings for `GPUBindGroup`.
Implemented the `createBindGroup` function of `GPUDevice`
Renamed `GPUBindGroupBinding` to `GPUBindGroupBindings` and `GPUBufferBinding` to `GPUBufferBindings` in the WebIDL, because these names are already occupied.

<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes addresses a part of #24706

cc @kvark @jdm @zakorgy

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-01-30 12:34:26 -05:00
Istvan Miklos
3cefc5f3a1 Initial implementation of GPUBindGroup for WebGPU
Added WebIDL bindings for `GPUBindGroup`.
Implemented the `createBindGroup` function of `GPUDevice`
2020-01-30 14:45:01 +01:00
Kunal Mohan
9859410193
Implement Blob methods (text/arraybuffer) and async file read method 2020-01-28 14:38:32 +05:30
Istvan Miklos
dbed5f1364 Support worker for WebGPU
To create resource ids for the WebGPU we need to access the `IdentityHub`.
In order to access the `IdentityHub` from a `Window` or a `Worker` as well, I've moved the `IdentityHub` to the `GlobalScope` from the `Navigator`.
2020-01-23 10:51:21 +01:00
Patrick Shaughnessy
b01b2d3d2e queueMicrotask added 2020-01-13 13:45:43 -05:00
CYBAI
f2007751dd Scaffold module script 2020-01-03 13:02:31 +09:00