128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
-
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
-
-
|
* Register a handler to handle the window being closed without
* having sent anything
*/
pinWindow.onClosed.addListener(function() {
if (pinWindowDidWork != 1) {
console.log("[cackey] The PIN dialog was closed without resubmitting the request, treating it as a failure");
cackeyMessageIncoming(
{
"data": {
"target": "cackey",
"command": messageEvent.data.command,
"id": messageEvent.data.id,
messageEvent.data.status = "error";
"status": "error",
"error": "PIN window closed without a PIN being provided"
}
}
)
messageEvent.data.error = "PIN window closed without a PIN being provided";
cackeyMessageIncoming(messageEvent);
}
}
return;
})
/*
* Pass this message off to the other window so that it may resubmit the request.
*/
pinWindow.contentWindow.parentWindow = window;
|