Changeset 60170 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
May 25, 2010, 9:51:59 AM (15 years ago)
Author:
[email protected]
Message:

2010-05-25 Kwang Yul Seo <[email protected]>

Reviewed by Darin Adler.

Build fix for JSFunction
https://bugs.webkit.org/show_bug.cgi?id=39658

MSVC can't compile one of JSFunction constructors when JIT is disabled.
"PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined.
Add ENABLE(JIT) guard to the constructor.

  • runtime/JSFunction.cpp: (JSC::JSFunction::JSFunction):
  • runtime/JSFunction.h:
Location:
trunk/JavaScriptCore/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSFunction.cpp

    r60117 r60170  
    6767}
    6868
     69#if ENABLE(JIT)
    6970JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, PassRefPtr<NativeExecutable> thunk)
    7071    : Base(globalObject, structure)
    71 #if ENABLE(JIT)
    7272    , m_executable(thunk)
    73 #endif
    7473    , m_scopeChain(globalObject->globalScopeChain())
    7574{
    7675    putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
    77 #if ENABLE(JIT)
    7876    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
    79 #else
    80     UNUSED_PARAM(thunk);
    81     UNUSED_PARAM(length);
    82     ASSERT_NOT_REACHED();
    83 #endif
    84 }
     77}
     78#endif
    8579
    8680JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, NativeFunction func)
  • trunk/JavaScriptCore/runtime/JSFunction.h

    r60117 r60170  
    4646    public:
    4747        JSFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int length, const Identifier&, NativeFunction);
     48#if ENABLE(JIT)
    4849        JSFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int length, const Identifier&, PassRefPtr<NativeExecutable>);
     50#endif
    4951        JSFunction(ExecState*, NonNullPassRefPtr<FunctionExecutable>, ScopeChainNode*);
    5052        virtual ~JSFunction();
Note: See TracChangeset for help on using the changeset viewer.