Chromium Code Reviews| Index: LayoutTests/http/tests/w3c/webperf/resources/worker.js |
| diff --git a/LayoutTests/http/tests/w3c/webperf/resources/worker.js b/LayoutTests/http/tests/w3c/webperf/resources/worker.js |
| index 1e3e58cf692c72c346a590c6e3b58572a8ea6882..610c8eb731c2cc362199e46e84869450d60153cf 100644 |
| --- a/LayoutTests/http/tests/w3c/webperf/resources/worker.js |
| +++ b/LayoutTests/http/tests/w3c/webperf/resources/worker.js |
| @@ -24,3 +24,14 @@ self.addEventListener("connect", function(event) { |
| port.postMessage(results); |
| }; |
| }); |
| + |
| +// Stringifies a DOM object. This function stringifies not only own properties |
| +// but also DOM attributes which are on a prototype chain. Note that |
| +// JSON.stringify only stringifies own properties. |
| +function stringifyDOMObject(domObject) { |
|
jsbell
2015/01/22 17:57:29
Hrm, I just noticed LayoutTests/http/tests/w3c/REA
Yuki
2015/01/23 08:06:20
Reverted this file and fixed performance-memory-in
|
| + var object = {}; |
| + for (var property in domObject) { |
| + object[property] = domObject[property]; |
| + } |
| + return JSON.stringify(object); |
| +} |