タグ

ブックマーク / murky-satyr.hatenadiary.org (2)

  • {__proto__:null} のススメ - ellaneous

    特に新しい話題でもないけど,使われているところをあまり見ない気がするので。 HashMap/Dictionary として narcissus/jsdefs.js#142 にもあるように,単に {} だと Object.prototype が付いて廻るので役に立たないことがある。辞書として使うなら {__proto__:null} にしておいて損はない。 速度稼ぎ 辿る親が居ないのでプロパティアクセスは少し速い。はず。 if(this.dump) print = function(x){ dump(x +'\n') }; if(this.console) print = function(x){ console.log(x) }; function say(){ print('|'+ [].join.call(arguments, '|') +'|') } ['{}', '{__proto_

    {__proto__:null} のススメ - ellaneous
    SUM
    SUM 2011/10/17
  • XPC cache removal - ellaneous

    Fx3.7a で JS Module の変更が思うように反映されない件の解決策を教わった。 16:53 (satyr) how do you reload jsm in nightly? restarting Firefox has no effect 17:03 (Unfocused) if you're on windows, delete XPC.mfl in your profile directory (or at least, the one under Local) 17:04 (Unfocused) its named differently on each OS unfortunately :\ nglayout.debug.disable_xul_cache 相当の設定は用意されてないらしい(?)ので再起動用のコードに仕込むことにする。 javascript: try

    XPC cache removal - ellaneous
    SUM
    SUM 2010/07/06
  • 1