Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 4cbe91a

Browse files
author
Julien Gilli
committed
src: update fix for --use-strict
This commit updates the previous commit in this branch according to the initial code review: - Adds 'use strict'; directive at the top of every built-in module and of the node.js file. - Uses process.binding('natives') to get the list of all built-in modules, including _debugger_agent.
1 parent 250d575 commit 4cbe91a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+112
-30
lines changed

lib/_debugger.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var util = require('util'),
2325
path = require('path'),
2426
net = require('net'),

lib/_http_agent.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var net = require('net');
2325
var util = require('util');
2426
var EventEmitter = require('events').EventEmitter;

lib/_http_client.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var util = require('util');
2325
var net = require('net');
2426
var url = require('url');

lib/_http_common.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var FreeList = require('freelist').FreeList;
2325
var HTTPParser = process.binding('http_parser').HTTPParser;
2426

lib/_http_incoming.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var util = require('util');
2325
var Stream = require('stream');
2426

lib/_http_outgoing.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var assert = require('assert').ok;
2325
var Stream = require('stream');
2426
var timers = require('timers');

lib/_http_server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var util = require('util');
2325
var net = require('net');
2426
var EventEmitter = require('events').EventEmitter;

lib/_linklist.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
function init(list) {
2325
list._idleNext = list;
2426
list._idlePrev = list;

lib/_stream_duplex.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
// a duplex stream is just a stream that is both readable and writable.
2325
// Since JS doesn't have multiple prototypal inheritance, this class
2426
// prototypally inherits from Readable, and then parasitically from

lib/_stream_passthrough.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
// a passthrough stream.
2325
// basically just the most minimal sort of Transform stream.
2426
// Every written chunk gets output as-is.

0 commit comments

Comments
 (0)