Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit 5bf5912

Browse files
Web Inspector: Make update-InspectorBackendCommands.rb only update legacy protocol versions
https://bugs.webkit.org/show_bug.cgi?id=130412 Patch by Joseph Pecoraro <[email protected]> on 2014-03-18 Reviewed by Timothy Hatcher. Rename the script and simplify to only update Legacy protocol versions. * Scripts/update-LegacyInspectorBackendCommands.rb: Renamed from Source/WebInspectorUI/Scripts/update-InspectorBackendCommands.rb. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent f04ec0f commit 5bf5912

File tree

2 files changed

+16
-37
lines changed

2 files changed

+16
-37
lines changed

Source/WebInspectorUI/ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2014-03-18 Joseph Pecoraro <[email protected]>
2+
3+
Web Inspector: Make update-InspectorBackendCommands.rb only update legacy protocol versions
4+
https://bugs.webkit.org/show_bug.cgi?id=130412
5+
6+
Reviewed by Timothy Hatcher.
7+
8+
Rename the script and simplify to only update Legacy protocol versions.
9+
10+
* Scripts/update-LegacyInspectorBackendCommands.rb: Renamed from Source/WebInspectorUI/Scripts/update-InspectorBackendCommands.rb.
11+
112
2014-03-18 Joseph Pecoraro <[email protected]>
213

314
Web Inspector: sourceMapResourceLoaded expects statusCode parameter

Source/WebInspectorUI/Scripts/update-InspectorBackendCommands.rb renamed to Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/ruby
22

33
require 'fileutils'
4-
require 'tempfile'
54
require 'tmpdir'
65

76
if ARGV.size != 0
@@ -11,26 +10,17 @@
1110

1211
WEB_INSPECTOR_PATH = File.expand_path File.join(File.dirname(__FILE__), "..")
1312
JAVASCRIPTCORE_PATH = File.expand_path File.join(File.dirname(__FILE__), "..", "..", "JavaScriptCore")
14-
WEBCORE_PATH = File.expand_path File.join(File.dirname(__FILE__), "..", "..", "WebCore")
15-
16-
JAVASCRIPT_INSPECTOR_PROTOCOLS_PATH = File.join JAVASCRIPTCORE_PATH, "inspector", "protocol"
17-
WEB_INSPECTOR_PROTOCOLS_PATH = File.join WEBCORE_PATH, "inspector", "protocol"
1813

1914
$code_generator_path = File.join JAVASCRIPTCORE_PATH, "inspector", "scripts", "CodeGeneratorInspector.py"
20-
$inspector_json_generator_path = File.join JAVASCRIPTCORE_PATH, "inspector", "scripts", "generate-combined-inspector-json.py"
21-
$inspector_js_json_path = Tempfile.new("generated-InspectorJS.json").path
22-
$inspector_web_json_path = Tempfile.new("generated-InspectorWeb.json").path
2315
$versions_directory_path = File.join WEB_INSPECTOR_PATH, "Versions"
24-
$web_inspector_user_interface_path = File.join WEB_INSPECTOR_PATH, "UserInterface"
25-
$web_inspector_protocol_path = File.join WEB_INSPECTOR_PATH, "UserInterface", "Protocol"
16+
$web_inspector_protocol_legacy_path = File.join WEB_INSPECTOR_PATH, "UserInterface", "Protocol", "Legacy"
2617

2718
class Task
28-
def initialize(input_json_path, dependency_json_path, type, output_directory_path, verification)
19+
def initialize(input_json_path, dependency_json_path, type, output_directory_path)
2920
@type = type
3021
@input_json_path = input_json_path
3122
@dependency_json_path = dependency_json_path
3223
@output_directory_path = output_directory_path
33-
@verification = verification
3424
end
3525

3626
def run
@@ -42,8 +32,7 @@ def run
4232

4333
Dir.mktmpdir do |tmpdir|
4434
dependency = @dependency_json_path ? "'#{@dependency_json_path}'" : ""
45-
cmd = "#{$code_generator_path} '#{@input_json_path}' #{dependency} --output_h_dir '#{tmpdir}' --output_cpp_dir '#{tmpdir}' --output_js_dir '#{tmpdir}' --write_always --output_type '#{@type}'"
46-
cmd += " --no_verification" if !@verification
35+
cmd = "#{$code_generator_path} '#{@input_json_path}' #{dependency} --no_verification --output_h_dir '#{tmpdir}' --output_cpp_dir '#{tmpdir}' --output_js_dir '#{tmpdir}' --write_always --output_type '#{@type}'"
4736
%x{ #{cmd} }
4837
if $?.exitstatus != 0
4938
puts "ERROR: Error Code (#{$?.exitstatus}) Evaluating: #{cmd}"
@@ -62,36 +51,15 @@ def run
6251
end
6352
end
6453

65-
def generate_combined_inspector_json
66-
# InspectorJS.json
67-
output = %x{ #{$inspector_json_generator_path} "#{JAVASCRIPT_INSPECTOR_PROTOCOLS_PATH}" > "#{$inspector_js_json_path}" }
68-
if $?.exitstatus != 0
69-
puts "ERROR: Could not generate combined InspectorJS.json file"
70-
exit 1
71-
end
72-
73-
# InspectorWeb.json
74-
output = %x{ #{$inspector_json_generator_path} "#{WEB_INSPECTOR_PROTOCOLS_PATH}" > "#{$inspector_web_json_path}" }
75-
if $?.exitstatus != 0
76-
puts "ERROR: Could not generate combined InspectorWeb.json file"
77-
exit 1
78-
end
79-
end
80-
8154
def all_tasks
8255
tasks = []
8356

84-
# ToT Inspector json files.
85-
generate_combined_inspector_json
86-
tasks << Task.new($inspector_js_json_path, nil, "JavaScript", $web_inspector_protocol_path, true)
87-
tasks << Task.new($inspector_web_json_path, $inspector_js_json_path, "Web", $web_inspector_protocol_path, true)
88-
8957
had_error = false
9058
Dir.glob(File.join($versions_directory_path, "*.json")).each do |version_path|
9159
match = File.basename(version_path).match(/^Inspector(.*?)\-([^-]+?)\.json$/)
9260
if match
93-
output_path = File.join $web_inspector_protocol_path, "Legacy", match[2]
94-
tasks << Task.new(version_path, nil, "Web", output_path, false)
61+
output_path = File.join $web_inspector_protocol_legacy_path, match[2]
62+
tasks << Task.new(version_path, nil, "Web", output_path)
9563
else
9664
puts "ERROR: Version file (#{version_path}) did not match the template Inspector<ANYTHING>-<VERSION>.js"
9765
had_error = true

0 commit comments

Comments
 (0)