<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[24809] trunk/JavaScriptCore</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/24809">24809</a></dd>
<dt>Author</dt> <dd>darin</dd>
<dt>Date</dt> <dd>2007-08-01 17:30:08 -0700 (Wed, 01 Aug 2007)</dd>
</dl>
<h3>Log Message</h3>
<pre> Reviewed by Kevin McCullough.
- fix <rdar://problem/5375186> pointers to pieces of class definition passed to JSClassCreate should all be const
* API/JSObjectRef.h: Added const.
* API/JSClassRef.cpp:
(OpaqueJSClass::OpaqueJSClass): Added const.
(OpaqueJSClass::create): Added const.
* API/JSObjectRef.cpp:
(JSClassCreate): Added const.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJavaScriptCoreAPIJSClassRefcpp">trunk/JavaScriptCore/API/JSClassRef.cpp</a></li>
<li><a href="#trunkJavaScriptCoreAPIJSObjectRefcpp">trunk/JavaScriptCore/API/JSObjectRef.cpp</a></li>
<li><a href="#trunkJavaScriptCoreAPIJSObjectRefh">trunk/JavaScriptCore/API/JSObjectRef.h</a></li>
<li><a href="#trunkJavaScriptCoreChangeLog">trunk/JavaScriptCore/ChangeLog</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJavaScriptCoreAPIJSClassRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/API/JSClassRef.cpp (24808 => 24809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/API/JSClassRef.cpp        2007-08-01 21:14:01 UTC (rev 24808)
+++ trunk/JavaScriptCore/API/JSClassRef.cpp        2007-08-02 00:30:08 UTC (rev 24809)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> , convertToType(definition->convertToType)
</span><span class="cx"> , cachedPrototype(0)
</span><span class="cx"> {
</span><del>- if (JSStaticValue* staticValue = definition->staticValues) {
</del><ins>+ if (const JSStaticValue* staticValue = definition->staticValues) {
</ins><span class="cx"> staticValues = new StaticValuesTable();
</span><span class="cx"> while (staticValue->name) {
</span><span class="cx"> // FIXME: <rdar://problem/4949018>
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (JSStaticFunction* staticFunction = definition->staticFunctions) {
</del><ins>+ if (const JSStaticFunction* staticFunction = definition->staticFunctions) {
</ins><span class="cx"> staticFunctions = new StaticFunctionsTable();
</span><span class="cx"> while (staticFunction->name) {
</span><span class="cx"> // FIXME: <rdar://problem/4949018>
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">
</span><span class="cx"> JSClassRef OpaqueJSClass::create(const JSClassDefinition* definition)
</span><span class="cx"> {
</span><del>- if (JSStaticFunction* staticFunctions = definition->staticFunctions) {
</del><ins>+ if (const JSStaticFunction* staticFunctions = definition->staticFunctions) {
</ins><span class="cx"> // copy functions into a prototype class
</span><span class="cx"> JSClassDefinition protoDefinition = kJSClassDefinitionEmpty;
</span><span class="cx"> protoDefinition.staticFunctions = staticFunctions;
</span></span></pre></div>
<a id="trunkJavaScriptCoreAPIJSObjectRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/API/JSObjectRef.cpp (24808 => 24809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/API/JSObjectRef.cpp        2007-08-01 21:14:01 UTC (rev 24808)
+++ trunk/JavaScriptCore/API/JSObjectRef.cpp        2007-08-02 00:30:08 UTC (rev 24809)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">
</span><span class="cx"> using namespace KJS;
</span><span class="cx">
</span><del>-JSClassRef JSClassCreate(JSClassDefinition* definition)
</del><ins>+JSClassRef JSClassCreate(const JSClassDefinition* definition)
</ins><span class="cx"> {
</span><span class="cx"> JSLock lock;
</span><span class="cx"> JSClassRef jsClass = (definition->attributes & kJSClassAttributeNoAutomaticPrototype)
</span></span></pre></div>
<a id="trunkJavaScriptCoreAPIJSObjectRefh"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/API/JSObjectRef.h (24808 => 24809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/API/JSObjectRef.h        2007-08-01 21:14:01 UTC (rev 24808)
+++ trunk/JavaScriptCore/API/JSObjectRef.h        2007-08-02 00:30:08 UTC (rev 24809)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> // -*- mode: c++; c-basic-offset: 4 -*-
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -344,8 +344,8 @@
</span><span class="cx"> const char* className;
</span><span class="cx"> JSClassRef parentClass;
</span><span class="cx">
</span><del>- JSStaticValue* staticValues;
- JSStaticFunction* staticFunctions;
</del><ins>+ const JSStaticValue* staticValues;
+ const JSStaticFunction* staticFunctions;
</ins><span class="cx">
</span><span class="cx"> JSObjectInitializeCallback initialize;
</span><span class="cx"> JSObjectFinalizeCallback finalize;
</span><span class="lines">@@ -376,7 +376,7 @@
</span><span class="cx"> @param definition A JSClassDefinition that defines the class.
</span><span class="cx"> @result A JSClass with the given definition. Ownership follows the Create Rule.
</span><span class="cx"> */
</span><del>-JSClassRef JSClassCreate(JSClassDefinition* definition);
</del><ins>+JSClassRef JSClassCreate(const JSClassDefinition* definition);
</ins><span class="cx">
</span><span class="cx"> /*!
</span><span class="cx"> @function
</span></span></pre></div>
<a id="trunkJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JavaScriptCore/ChangeLog (24808 => 24809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JavaScriptCore/ChangeLog        2007-08-01 21:14:01 UTC (rev 24808)
+++ trunk/JavaScriptCore/ChangeLog        2007-08-02 00:30:08 UTC (rev 24809)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2007-08-01 Darin Adler <darin@apple.com>
+
+ Reviewed by Kevin McCullough.
+
+ - fix <rdar://problem/5375186> pointers to pieces of class definition passed to JSClassCreate should all be const
+
+ * API/JSObjectRef.h: Added const.
+
+ * API/JSClassRef.cpp:
+ (OpaqueJSClass::OpaqueJSClass): Added const.
+ (OpaqueJSClass::create): Added const.
+ * API/JSObjectRef.cpp:
+ (JSClassCreate): Added const.
+
</ins><span class="cx"> 2007-08-01 Steve Falkenburg <sfalken@apple.com>
</span><span class="cx">
</span><span class="cx"> Build mod: Fix sln to match configs in vcproj.
</span></span></pre>
</div>
</div>
</body>
</html>