Discard usage of deprecated APIs.

This commit is contained in:
Cheng Zhao 2014-04-29 11:54:12 +08:00
parent ac31dc9672
commit 6df86afef8
3 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ describe 'ipc module', ->
describe 'ipc.sendSync', -> describe 'ipc.sendSync', ->
it 'can be replied by setting event.returnValue', -> it 'can be replied by setting event.returnValue', ->
msg = ipc.sendChannelSync 'echo', 'test' msg = ipc.sendSync 'echo', 'test'
assert.equal msg, 'test' assert.equal msg, 'test'
it 'does not crash when reply is not sent and browser is destroyed', (done) -> it 'does not crash when reply is not sent and browser is destroyed', (done) ->

View file

@ -2,7 +2,7 @@
<body> <body>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
var ipc = require('ipc'); var ipc = require('ipc');
ipc.sendChannelSync('send-sync-message', 'message'); ipc.sendSync('send-sync-message', 'message');
</script> </script>
</body> </body>
</html> </html>

View file

@ -37,11 +37,11 @@
return { return {
log: function() { log: function() {
args = Array.prototype.slice.call(arguments); args = Array.prototype.slice.call(arguments);
ipc.sendChannel('console.log', args); ipc.send('console.log', args);
}, },
error: function() { error: function() {
args = Array.prototype.slice.call(arguments); args = Array.prototype.slice.call(arguments);
ipc.sendChannel('console.error', args); ipc.send('console.error', args);
}, },
} }
}); });