nboyd%atg.com 5e9bc346cb Date:
Mon, 02 Jul 2001 12:58:44 +0200
       From:
             Igor Bukanov <igor@icesoft.no>
 Organization:
             Wind River
         To:
             Norris Boyd <nboyd@atg.com>




Hi, Norris!

It turned out that in our browser implementation we need to be able to
abort too-long-running scripts. I implemented that for interpreter mode
via instruction counter callback. This callback is called at branch
points after instruction counter reach certain threshold as you
suggested once in mozilla-jseng mail list. The attached patch adds to
Context.java:
        public int getInstructionObserverThreshold() {
                return instructionThreshold;
        }

        public void setInstructionObserverThreshold(int threshold) {
                instructionThreshold = threshold;
        }

        protected void observeInstructionCount(int instructionCount) {}
...
        int instructionCount;
        int instructionThreshold;


where observeInstructionCount is a callback that should be overwritten
in a custom Context to observe execution.

Then as long as instructionThreshold is not 0 modifications to
Interpreter.java increase instructionCount at branches/function
calls/catch blocks and call cx.observeInstructionCount when it reaches
instructionThreshold. I also replaces 3 catch statements in
Interpreter.interpret for EcmaError, JavaScriptException and
RuntimeException by single one to reduce code duplication.

The patch lacks documentation in Context.java but I would add that later
if the patch is ok.

Regards, Igor

==========================


Subject:
        Re: Working for Rhino
   Date:
        Tue, 3 Jul 2001 10:41:42 +0200
   From:
        felix.meschberger@day.com
     To:
        Norris Boyd <nboyd@atg.com>




Hi Norris,

Well, I couldn't wait ;-) Here are my diffs :

   LazilyLoadedCtor: Make class and constructor public for use on my host
   objects
   NodeTransformer : Replace checks for "arguments" by call to
   checkActivationNeeded() in Context
   Context: Add the name list proposed as a hashtable with
   adder/checker/remover methods

Hope this helps. Regards
Felix
2001-07-05 02:08:14 +00:00
2001-07-02 03:49:50 +00:00
2001-07-02 23:41:02 +00:00
2001-07-04 19:42:06 +00:00
2001-07-04 17:56:17 +00:00
2001-07-04 04:42:51 +00:00
2001-06-29 08:08:59 +00:00
2001-07-05 02:08:14 +00:00
2001-07-03 16:28:42 +00:00
2001-04-03 22:13:38 +00:00
2000-12-14 15:53:14 +00:00
2001-07-04 17:52:39 +00:00
2001-07-04 18:02:00 +00:00
2001-07-04 23:23:05 +00:00
2001-04-03 22:13:38 +00:00
2001-04-07 04:34:53 +00:00
2001-07-02 03:59:21 +00:00
2001-07-02 03:49:50 +00:00
2001-04-03 22:13:38 +00:00
2001-04-03 22:13:38 +00:00
Description
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
6.1 GiB
Languages
JavaScript 32.3%
C++ 25.4%
HTML 21%
C 10.8%
Python 2.8%
Other 7.2%