Changeset 2871 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Nov 25, 2002, 6:49:38 PM (23 years ago)
Author:
rjw
Message:

i Added a debug menu to turn back/forward cache on and off.

Off by default. Use with discretion. Still leaks like
a sieve. Useful to provide a sense of potential speed up.

  • Debug/DebugUtilities.m: (-[DebugUtilities createDebugMenu]): (-[BrowserDocument validate_showDOMTree:]): (-[BrowserDocument toggleBackForwardEnabled:]):

Changes fro back/forward cache.

  • History.subproj/WebHistoryItem.h:
  • History.subproj/WebHistoryItem.m: (+[WebHistoryItem setUsePageCache:]): (+[WebHistoryItem usePageCache]):
  • WebCoreSupport.subproj/WebBridge.m: (-[WebBridge saveDocumentToPageCache:]):
  • WebView.subproj/WebFramePrivate.h:
  • WebView.subproj/WebFramePrivate.m: (-[WebFrame _detachFromParent]): (-[WebFrame _canCachePage]): (-[WebFrame _setState:]):

Tweaked some debugging info.

  • khtml/xml/dom_docimpl.cpp: (DocumentImpl::~DocumentImpl): (DocumentImpl::detach):

Added debugging info. Fixed property map save function.

  • kjs/nodes.cpp: (FunctionCallNode::evaluate):
  • kjs/property_map.cpp:
Location:
trunk/JavaScriptCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r2863 r2871  
     12002-11-25  Richard Williamson   <[email protected]>
     2
     3        Added debugging info.  Fixed property map save function.
     4       
     5        * kjs/nodes.cpp:
     6        (FunctionCallNode::evaluate):
     7        * kjs/property_map.cpp:
     8
    192002-11-25  Richard Williamson   <[email protected]>
    210
  • trunk/JavaScriptCore/ChangeLog-2002-12-03

    r2863 r2871  
     12002-11-25  Richard Williamson   <[email protected]>
     2
     3        Added debugging info.  Fixed property map save function.
     4       
     5        * kjs/nodes.cpp:
     6        (FunctionCallNode::evaluate):
     7        * kjs/property_map.cpp:
     8
    192002-11-25  Richard Williamson   <[email protected]>
    210
  • trunk/JavaScriptCore/ChangeLog-2003-10-25

    r2863 r2871  
     12002-11-25  Richard Williamson   <[email protected]>
     2
     3        Added debugging info.  Fixed property map save function.
     4       
     5        * kjs/nodes.cpp:
     6        (FunctionCallNode::evaluate):
     7        * kjs/property_map.cpp:
     8
    192002-11-25  Richard Williamson   <[email protected]>
    210
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r2851 r2871  
    739739  Value v = ref.getValue(exec);
    740740
     741    Object o = v.toObject(exec);
     742    UString s = o.toString(exec);
     743    //printf ("FunctionCallNode::evaluate  %s\n", s.ascii());
     744   
    741745  if (v.type() != ObjectType) {
    742746#ifndef NDEBUG
  • trunk/JavaScriptCore/kjs/property_map.cpp

    r2863 r2871  
    186186}
    187187
     188#ifdef DEBUG_PROPERTIES
     189static void printAttributes(int attributes)
     190{
     191    if (attributes == 0)
     192        printf ("None ");
     193    if (attributes & ReadOnly)
     194        printf ("ReadOnly ");
     195    if (attributes & DontEnum)
     196        printf ("DontEnum ");
     197    if (attributes & DontDelete)
     198        printf ("DontDelete ");
     199    if (attributes & Internal)
     200        printf ("Internal ");
     201    if (attributes & Function)
     202        printf ("Function ");
     203}
     204#endif
     205
    188206void PropertyMap::put(const Identifier &name, ValueImp *value, int attributes)
    189207{
     
    191209
    192210    UString::Rep *rep = name._ustring.rep;
     211   
     212#ifdef DEBUG_PROPERTIES
     213    printf ("adding property %s, attributes = 0x%08x (", name.ascii(), attributes);
     214    printAttributes(attributes);
     215    printf (")\n");
     216#endif
    193217   
    194218#if USE_SINGLE_ENTRY
     
    419443    } else {
    420444        for (int i = 0; i != _table->size; ++i)
    421             if (_table->entries[i].key && _table->entries[i].attributes == 0)
     445            if (_table->entries[i].key && (_table->entries[i].attributes == 0 || _table->entries[i].attributes == (DontDelete | Internal)))
     446            //if (_table->entries[i].key)
    422447                ++count;
    423448    }
     
    428453        return;
    429454    }
     455   
    430456    p._properties = new SavedProperty [count];
     457    p._count = count;
    431458   
    432459    SavedProperty *prop = p._properties;
     
    442469    } else {
    443470        for (int i = 0; i != _table->size; ++i) {
    444             if (_table->entries[i].key && _table->entries[i].attributes == 0) {
     471            if (_table->entries[i].key && (_table->entries[i].attributes == 0 || _table->entries[i].attributes == (DontDelete | Internal))) {
     472            //if (_table->entries[i].key) {
    445473                prop->key = Identifier(_table->entries[i].key);
    446474                prop->value = Value(_table->entries[i].value);
     475                ++prop;
    447476            }
    448477        }
     
    452481void PropertyMap::restore(const SavedProperties &p)
    453482{
    454     for (int i = 0; i != p._count; ++i)
     483    for (int i = 0; i != p._count; ++i){
    455484        put(p._properties[i].key, p._properties[i].value.imp(), 0);
     485    }
    456486}
    457487
Note: See TracChangeset for help on using the changeset viewer.