Skip to content

Instantly share code, notes, and snippets.

Traceback (most recent call last):
File "/usr/local/bin/b2gperf", line 9, in <module>
load_entry_point('b2gperf==0.8', 'console_scripts', 'b2gperf')()
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/b2gperf/b2gperf.py", line 607, in cli
marionette.start_session()
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/marionette/marionette.py", line 444, in start_session
self.session = self._send_message('newSession', 'value')
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/marionette/marionette.py", line 335, in _send_message
response = self.client.send(message)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/marionette/client.py", line 85, in send
@alivedise
alivedise / sources.xml
Created September 11, 2013 12:33
sources.xml
<?xml version="1.0" ?><manifest>
<remote fetch="https://git.mozilla.org/external/aosp" name="aosp"/>
<remote fetch="https://git.mozilla.org/b2g" name="b2gmozilla"/>
<remote fetch="https://git.mozilla.org/b2g" name="b2g"/>
<remote fetch="https://git.mozilla.org/b2g" name="mozilla"/>
<remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
@alivedise
alivedise / 881797.diff
Created August 6, 2013 09:46
Bug 881797 WIP
diff --git a/dom/activities/src/Activity.cpp b/dom/activities/src/Activity.cpp
--- a/dom/activities/src/Activity.cpp
+++ b/dom/activities/src/Activity.cpp
@@ -60,31 +60,74 @@ Activity::Initialize(nsISupports* aOwner
nsString message =
NS_LITERAL_STRING("Can start activity from non user input or chrome code");
console->LogStringMessage(message.get());
return NS_OK;
@alivedise
alivedise / SystemMessageHandler.js
Last active December 20, 2015 06:59
system message handler
// system-message-handler
if (activity && disposition == 'inline') {
startInlineActivity(...);
return;
}
if (theTargetIsNotRunning) {
appendFrame();
} else if (!doNotReload) {
doReplaceTheURLOfTheTargetFrame();
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM /home/alive/mc/dom/messages/interfaces/nsISystemMessagesInternal.idl
*/
#ifndef __gen_nsISystemMessagesInternal_h__
#define __gen_nsISystemMessagesInternal_h__
#ifndef __gen_domstubs_h__
#include "domstubs.h"
@alivedise
alivedise / gist:6018073
Created July 17, 2013 06:18
build error message
/home/alive/mc/dom/bluetooth/BluetoothService.cpp: In member function 'virtual void mozilla::dom::bluetooth::BluetoothService::Notify(const mozilla::dom::bluetooth::BluetoothSignal&)':
/home/alive/mc/dom/bluetooth/BluetoothService.cpp:801: error: no matching function for call to 'nsISystemMessagesInternal::BroadcastMessage(nsString&, jsval)'
../../dist/include/nsISystemMessagesInternal.h:40: note: candidates are: virtual nsresult nsISystemMessagesInternal::BroadcastMessage(const nsAString_internal&, const JS::Value&, const JS::Value&)
@alivedise
alivedise / a.patch
Created July 17, 2013 06:15
Patch for 887650
# HG changeset patch
# Parent 82fafd8ee40fac3255f81cf1ae2d5c72cf75deb7
# User Alive Kuo <[email protected]>
diff --git a/b2g/chrome/content/shell.js b/b2g/chrome/content/shell.js
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -564,17 +564,18 @@
openAppForSystemMessage: function shell_openAppForSystemMessage(msg) {
let origin = Services.io.newURI(msg.manifest, null, null).prePath;
@alivedise
alivedise / gist:4983732
Created February 19, 2013 07:15
Mocha template
'use strict';
requireApp('system/js/sound_manager.js');
var mocksFor_THIS_MODULE = [''];
mocks_THIS_MODULE.forEach(function(mockName) {
if (! window[mockName]) {
window[mockName] = null;
}
@alivedise
alivedise / bug
Created February 3, 2013 14:55
Bug: 統聯客運訂票系統選擇座位頁面問題
Step to reproduce:
1. 使用訂票系統到選票數及座位頁面
Expected:
1. 可正常按確定送出
Actual:
1. 確定送出無用
Root cause:
document.addEventListener('mozvisibilitychange', function onChange() {
if (document.mozHidden) {
console.log('[', document.URL ,'] HIDDEN=====');
} else {
console.log('[', document.URL ,'] SHOWN=====');
}
});