This repository was archived by the owner on Oct 15, 2020. It is now read-only.
Commit d69e2c8
committed
chakrashim: Add 'Debug' object only when needed
If `--debug` is specified, the in-built 'Debug' object is exposed by
chakra.dll that has some [APIs](https://msdn.microsoft.com/en-us/library/bs12a9wf(v=vs.94).aspx) that node-uwp relies on. With my change in #155,
I had overriden 'Debug' global object and hence certain Debug APIs stopped
working with `--debug` switch. The original intent of adding `Debug` object
was that `util.js` fetches this object in Debugging context. In absense of
`--debug` flag this object is unavailable and hence `util.js` throws TypeError.
The fix is to expose `Debug` object only in the DebugContext (called from
`util.js`). If ran with `--debug`, by the time `utill.js` code executes, engine
would have already expose in-built `Debug` object and we won't overwrite it.
Without `--debug` we would override `Debug` object.
Thanks @agarwal-sandeep for helping debugging this issue.
Fixes : #1751 parent e300485 commit d69e2c8
File tree
3 files changed
+20
-8
lines changed- deps/chakrashim
- lib
- src
- test/parallel
3 files changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 22 | | |
28 | 23 | | |
29 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
66 | 83 | | |
67 | 84 | | |
68 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
0 commit comments