<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>53810</bug_id>
          
          <creation_ts>2011-02-04 14:02:38 -0800</creation_ts>
          <short_desc>WebKit2 clients fail to launch on Windows if client exe is in a different directory from WebKit</short_desc>
          <delta_ts>2011-02-04 14:56:28 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Steve Falkenburg">sfalken</reporter>
          <assigned_to name="Steve Falkenburg">sfalken</assigned_to>
          <cc>buildbot</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>345780</commentid>
    <comment_count>0</comment_count>
    <who name="Steve Falkenburg">sfalken</who>
    <bug_when>2011-02-04 14:02:38 -0800</bug_when>
    <thetext>WebKit2 clients fail to launch on Windows if client exe is in a different directory from WebKit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>345782</commentid>
    <comment_count>1</comment_count>
      <attachid>81284</attachid>
    <who name="Steve Falkenburg">sfalken</who>
    <bug_when>2011-02-04 14:07:38 -0800</bug_when>
    <thetext>Created attachment 81284
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>345786</commentid>
    <comment_count>2</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-02-04 14:09:03 -0800</bug_when>
    <thetext>Attachment 81284 did not pass style-queue:

Failed to run &quot;[&apos;Tools/Scripts/check-webkit-style&apos;, &apos;--diff-files&apos;, u&apos;Source/WebKit2/ChangeLog&apos;, u&apos;Source/WebKit...&quot; exit_code: 1

Source/WebKit2/win/MainWin.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>345790</commentid>
    <comment_count>3</comment_count>
      <attachid>81284</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-02-04 14:18:51 -0800</bug_when>
    <thetext>Comment on attachment 81284
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=81284&amp;action=review

&gt; Source/WebKit2/win/MainWin.cpp:50
&gt; +    ::GetModuleFileNameW(0, webKitPath, ARRAYSIZE(webKitPath));

You could also use _countof or WTF_ARRAY_LENGTH. Maybe the latter is best, since it can be used in cross-platform code, too?

&gt; Source/WebKit2/win/MainWin.cpp:57
&gt; +    // set to 0. We want both the WebKit client app DLL path and the WebKit directory DLL path in
&gt; +    // the DLL search order, and we want the current directory set to the WebKit client app path.
&gt; +    ::SetDllDirectoryW(webKitPath);

How does this guarantee that the &quot;client app DLL path&quot; is in the DLL search order, or that the current directory is set to the WebKit client app path?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>345800</commentid>
    <comment_count>4</comment_count>
    <who name="Steve Falkenburg">sfalken</who>
    <bug_when>2011-02-04 14:36:11 -0800</bug_when>
    <thetext>Since we&apos;re using ARRAYSIZE directly within a Win32 call, it seems ok to keep.
The file doesn&apos;t use any WTF headers now, so this would be the only dependency.

The client app path will be in the search order, since the default use of CreateProcess sets the working directory to the same directory as the launching app. The current directory will be set to that path in the client app by Windows Explorer when it launches that app.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>345801</commentid>
    <comment_count>5</comment_count>
    <who name="Steve Falkenburg">sfalken</who>
    <bug_when>2011-02-04 14:37:29 -0800</bug_when>
    <thetext>Committed r77678: &lt;http://trac.webkit.org/changeset/77678&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>345823</commentid>
    <comment_count>6</comment_count>
    <who name="Build Bot">buildbot</who>
    <bug_when>2011-02-04 14:56:28 -0800</bug_when>
    <thetext>Attachment 81284 did not build on win:
Build output: http://queues.webkit.org/results/7698620</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>81284</attachid>
            <date>2011-02-04 14:07:38 -0800</date>
            <delta_ts>2011-02-04 14:18:51 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-53810-20110204140706.patch</filename>
            <type>text/plain</type>
            <size>3658</size>
            <attacher name="Steve Falkenburg">sfalken</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
S2l0Mi9DaGFuZ2VMb2cJKHJldmlzaW9uIDc3NjY4KQorKysgU291cmNlL1dlYktpdDIvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMjAgQEAKKzIwMTEtMDItMDQgIFN0ZXZlIEZh
bGtlbmJ1cmcgIDxzZmFsa2VuQGFwcGxlLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JP
RFkgKE9PUFMhKS4KKworICAgICAgICBXZWJLaXQyIGNsaWVudHMgZmFpbCB0byBsYXVuY2ggb24g
V2luZG93cyBpZiBjbGllbnQgZXhlIGlzIGluIGEgZGlmZmVyZW50IGRpcmVjdG9yeSBmcm9t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9IlNobHdhcGkubGliIgogCS8+CiA8L1Zpc3VhbFN0dWRpb1Byb3Bl
cnR5U2hlZXQ+Cg==
</data>
<flag name="review"
          id="72850"
          type_id="1"
          status="+"
          setter="aroben"
    />
          </attachment>
      

    </bug>

</bugzilla>